smarie / python-makefun

Dynamically create python functions with a proper signature.
https://smarie.github.io/python-makefun/
BSD 3-Clause "New" or "Revised" License
119 stars 16 forks source link

ValueError: Cannot preset 0 positional args, function case_second has only 0 args. #59

Closed smarie closed 3 years ago

smarie commented 3 years ago

When using partial on a function with no args, this works with functools but not with makefun.

Note that this is a convenient way to create a copy of a function, see https://stackoverflow.com/a/6527746/7262247