Nov-05-2017, 10:52 PM
Thanks :-)
A small example:
partial
is a function, that takes as first argument a function and all following arguments are the applied arguments to the function. Keyword arguments are also applied to the function. It returns the partial function. Later you can call this function with the rest arguments/keyword arguments. The double star in front of a name in a function call is keyword argument unpacking.A small example:
def foo(a, b, c, d): return a, b, c, d f = partial(foo, b=2, c=3, d=4) print(f(1))
Output:(1, 2, 3, 4)
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!