In the following method definitions, what does the
** do for
def foo(param1, *param2):
def bar(param1, **param2):
**kwargs is a common idiom to allow arbitrary number of arguments to functions as described in the section more on defining functions in the Python documentation.
*args will give you all function parameters as a tuple: Continue reading “[Python] What does ** (double star/asterisk) and * (star/asterisk) do for parameters?”