Skip to main content

Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+

Project description

funcsigs is a backport of the PEP 362 function signature features from Python 3.3’s inspect module. The backport is compatible with Python 2.6, 2.7 as well as 3.2 and up.

Documentation

The reference documentation is standard library documentation for the inspect module in Python3. This documentation has been included in the funcsigs package documentation hosted on Read The Docs.

Example

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.

Compatability

The funcsigs backport has been tested against:

  • CPython 2.6
  • CPython 2.7
  • CPython 3.2

Continuous integration testing is provided by Travis CI.

There is one known compatability issue with Python 2.x when a function is assigned to the __wrapped__ property of a class after it has been constructed. Otherwise the functionality is believed to be uniform between both Python2 and Python3.

Issues

Source code for funcsigs is hosted on GitHub. Any bug reports or feature requests can be made using GitHub’s issues system. build_status

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for funcsigs, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size funcsigs-0.1.tar.gz (698.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page