Function signature objects for callables
Back port of Python 3.3's function signature tools from the inspect module, modified to be compatible with Python 2.7 and 3.2+.
Bases: object
Result of Signature.bind call. Holds the mapping of arguments to the function's parameters.
Has the following public attributes:
An ordered mutable mapping of parameters' names to arguments' values. Does not contain arguments' default values.
The Signature object that created this instance.
Tuple of positional arguments values.
Dict of keyword arguments values.
Bases: object
Represents a parameter in a function signature.
Has the following public attributes:
The name of the parameter as a string.
The default value for the parameter if specified. If the parameter has no default value, this attribute is not set.
The annotation for the parameter if specified. If the parameter has no annotation, this attribute is not set.
Describes how argument values are bound to the parameter. Possible values: Parameter.POSITIONAL_ONLY, Parameter.POSITIONAL_OR_KEYWORD, Parameter.VAR_POSITIONAL, Parameter.KEYWORD_ONLY, Parameter.VAR_KEYWORD.
alias of _empty
Creates a customized copy of the Parameter.
Bases: object
A Signature object represents the overall signature of a function. It stores a Parameter object for each parameter accepted by the function, as well as information specific to the function itself.
A Signature object has the following public attributes and methods:
An ordered mapping of parameters' names to the corresponding Parameter objects (keyword-only arguments are in the same order as listed in code.co_varnames).
The annotation for the return type of the function if specified. If the function has no annotation for its return type, this attribute is not set.
alias of _empty
Get a BoundArguments object, that maps the passed args and kwargs to the function's signature. Raises TypeError if the passed arguments can not be bound.
Get a BoundArguments object, that partially maps the passed args and kwargs to the function's signature. Raises TypeError if the passed arguments can not be bound.