github smarie/python-makefun 0.2.0
0.2.0 - Various new features and improvements

latest releases: 1.15.2, 1.15.1, 1.15.0...
5 years ago

create_function:

  • create_function does not require users to prepend "def " to the signature anymore. Fixed #5

  • Return annotations are now supported. Fixes #4.

  • Type hint as comments are supported but the generated function loses the annotations because inspect.signature loses the annotation too in that case. Fixes #7

  • Variable-length arguments such as *args and **kwargs are now properly handled. Fixes #2

  • Handler functions can now receive the dynamically created function as first argument, by using create_function(func_signature, func_handler, inject_as_first_arg=True). Fixes #1

  • Renamed _call_ into _call_handler_ in the generated code.

Misc:

  • Added pytest-cases dependency for tests.

See documentation page for details.

Don't miss a new python-makefun release

NewReleases is sending notifications on new releases.