Skip to main content
`Ctrl`+`K`

# argmap.signature

classmethod argmap.signature(f)

  Construct a Signature object describing `f`

  Compute a Signature so that we can write a function wrapping f with the same signature and call-type.

  Parameters:
    f callable

      A function to be decorated

  Returns:
    sig argmap.Signature

      The Signature of f

  Notes

  The Signature is a namedtuple with names:

  > name : a unique version of the name of the decorated function signature : the inspect.signature of the decorated function def_sig : a string used as code to define the new function call_sig : a string used as code to call the decorated function names : a dict keyed by argument name and index to the argument’s name n_positional : the number of positional arguments in the signature args : the name of the VAR_POSITIONAL argument if any, i.e. *theseargs kwargs : the name of the VAR_KEYWORDS argument if any, i.e. **kwargs

  These named attributes of the signature are used in `assemble` and `compile` to construct a string of source code for the decorated function.