Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
To obtain a signature object, pass the target function to the funcsigs.signature function.
>>> from funcsigs import signature >>> def foo(a, b=None, *args, **kwargs): ... pass >>> sig = signature(foo)
For the details of the signature object, refer to the either the package of standard library documentation.
The funcsigs backport has been tested against:
- CPython 2.6
- CPython 2.7
- CPython 3.2
- PyPy 1.9
Continuous integration testing is provided by Travis CI.
Under Python 2.x there is a compatability issue when a function is assigned to the __wrapped__ property of a class after it has been constructed. Similiarily there under PyPy directly passing the __call__ method of a builtin is also a compatability issues. Otherwise the functionality is believed to be uniform between both Python2 and Python3.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|funcsigs-0.4-py2.py3-none-any.whl (14.5 kB) Copy SHA256 hash SHA256||Wheel||2.7||Dec 20, 2013|
|funcsigs-0.4.tar.gz (25.7 kB) Copy SHA256 hash SHA256||Source||None||Dec 20, 2013|