Giter Club home page Giter Club logo

funcsigs's Introduction

funcsigs

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

Copyright

This is a derived work of CPython under the terms of the PSF License Agreement. The original CPython inspect module, its unit tests and documentation are the copyright of the Python Software Foundation. The derived work is distributed under the Apache License Version 2.0.

funcsigs's People

Contributors

aliles avatar epsy avatar tripplilley avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.