About 132,000 results
Open links in new tab
  1. python - How to use "pass" statement? - Stack Overflow

    The pass statement in Python is used when a statement is required syntactically, but you do not want any command or code to execute. The pass statement is a null operation; nothing …

  2. Python - Passing a function into another function - Stack Overflow

    functions are first-class objects in python. you can pass them around, include them in dicts, lists, etc. Just don't include the parenthesis after the function name. Example, for a function named …

  3. How do I pass a method as a parameter in Python [duplicate]

    Methods and functions are objects in Python, just like anything else, and you can pass them around the way you do variables. In fact, you can think about a method (or function) as a …

  4. python pandas: apply a function with arguments to a series

    The apply method accepts a python function which should have a single parameter. If you want to pass more parameters you should use functools.partial as suggested by Joel Cornett in his …

  5. How can I specify the function type in my type hints?

    Jun 15, 2016 · How can I specify the type hint of a variable as a function type? There is no typing.Function, and I could not find anything in the relevant PEP, PEP 483.

  6. python - How to pass arguments to functions by the click of …

    Thanks for the reply, but in my case the value of the name will change as the buttons will be generated by a for loop. So can I pass the values as arguments to the function?

  7. python - Pass a list to a function to act as multiple arguments

    function_that_needs_strings(*my_list) where my_list can be any iterable; Python will loop over the given object and use each element as a separate argument to the function.

  8. Passing functions with arguments to another function in Python?

    Is it possible to pass functions with arguments to another function in Python? Say for something like: def perform (function): return function () But the functions to be passed will have argume...

  9. python - Passing a dictionary to a function as keyword parameters ...

    How to use a dictionary with more keys than function arguments: A solution to #3, above, is to accept (and ignore) additional kwargs in your function (note, by convention _ is a variable …

  10. python - pass **kwargs argument to another function with …

    Mar 26, 2012 · But Python expects: 2 formal arguments plus keyword arguments. By prefixing the dictionary by '**' you unpack the dictionary kwargs to keywords arguments. A dictionary (type …