Port variant py27
Summary Signature functions backport from 3.3 (PY 27)
Package version 1.0.2
Keywords python, devel
Maintainer Python Automaton
License Not yet specified
Other variants py36 | py37
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 02 JUL 2018, 11:38:38 UTC
Port created 29 JUN 2017, 18:40:55 UTC
Subpackage Descriptions
single .. funcsigs documentation master file, created by sphinx-quickstart on Fri Apr 20 20:27:52 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Introducing funcsigs ==================== The Funcsigs Package -------------------- ``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.3 and up. 3.2 was supported by version 0.4, but with setuptools and pip no longer supporting 3.2, we cannot make any statement about 3.2 compatibility. Compatibility ````````````` The ``funcsigs`` backport has been tested against: * CPython 2.6 * CPython 2.7 * CPython 3.3 * CPython 3.4 * CPython 3.5 * CPython nightlies * PyPy and PyPy3(currently failing CI) Continuous integration testing is provided by `Travis CI`_. Under Python 2.x there is a compatibility 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 compatibility 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| |coverage| Example ------- To obtain a `Signature` object, pass the target function to the ``funcsigs.signature`` function. .. code-block:: python >>> from funcsigs import signature >>> def foo(a, b=None, *args, **kwargs): ... pass ... >>> sig = signature(foo) >>> sig >>> sig.parameters OrderedDict([('a', ), ('b', ), ('args', ), ('kwargs', )]) >>> sig.return_annotation Introspecting callables with the Signature object ------------------------------------------------- .. note:: This section of documentation is a direct reproduction of the Python standard library documentation for the inspect module. The Signature object represents the call signature of a callable object and its return annotation. To retrieve a Signature object, use the :func:`signature` function. .. function:: signature(callable) Return a :class:`Signature` object for the given ``callable``:: >>> from funcsigs import signature >>> def foo(a, *, b:int, **kwargs): ... pass >>> sig = signature(foo) >>> str(sig) '(a, *, b:int, **kwargs)' >>> str(sig.parameters['b']) 'b:int' >>> sig.parameters['b'].annotation Accepts a wide range of python callables, from plain functions and classes to :func:`functools.partial` objects. .. note::
Configuration Switches (platform-specific settings discarded)
PY27 ON Build using Python 2.7 PY36 OFF Build using Python 3.6 PY37 OFF Build using Python 3.7
Package Dependencies by Type
Build and Runtime python-setuptools:single:py27
Download groups
main mirror://PYPI/f/funcsigs
Distribution File Information
a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50 27947 funcsigs-1.0.2.tar.gz
Ports that require python-funcsigs:py27
No other ports depend on this one.