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.

Latest PyPI version

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. Current build status Coverage 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.4.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

funcsigs-0.4-py2.py3-none-any.whl (14.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for funcsigs-0.4.tar.gz
Algorithm Hash digest
SHA256 d83ce6df0b0ea6618700fe1db353526391a8a3ada1b7aba52fed7a61da772033
MD5 fb1d031f284233e09701f6db1281c2a5
BLAKE2b-256 875e44bc85c41e5b33b6bf1fcb2f6ccbc4ee74337af079438d2a28c5c45137e1

See more details on using hashes here.

File details

Details for the file funcsigs-0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for funcsigs-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ff5ad9e2f8d9e5d1e8bbfbcf47722ab527cf0d51caeeed9da6d0f40799383fde
MD5 0df93bdb54034b9f0263785c7d6b84f4
BLAKE2b-256 5e9f025d4c92c6a1a94313cdf0813cd76f5700f8e5434fa15165090a6446ae22

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