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

  • 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.

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

Project details


Download files

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

Source Distribution

funcsigs-0.2.tar.gz (698.3 kB view details)

Uploaded Source

File details

Details for the file funcsigs-0.2.tar.gz.

File metadata

  • Download URL: funcsigs-0.2.tar.gz
  • Upload date:
  • Size: 698.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for funcsigs-0.2.tar.gz
Algorithm Hash digest
SHA256 6896c54379cbaf8a0e14d095bc00fc0969f08f5f7908a86ddde7b15549c93916
MD5 1f56853306a9aa69b58051854d70f904
BLAKE2b-256 b7561def30b73d76ef0a6c68c8a14b3fc31d361c53b02ff2ffb1c91d2b465698

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page