• Home
  • Raw
  • Download

Lines Matching full:signature

12 *funcsigs* is a backport of the `PEP 362`_ function signature features from
17 …ct: http://docs.python.org/3/library/inspect.html#introspecting-callables-with-the-signature-object
48 Introspecting callables with the Signature object
56 The Signature object represents the call signature of a callable object and its
57 return annotation. To retrieve a Signature object, use the :func:`signature`
60 .. function:: signature(callable)
62 Return a :class:`Signature` object for the given ``callable``::
64 >>> from inspect import signature
68 >>> sig = signature(foo)
89 .. class:: Signature
91 A Signature object represents the call signature of a function and its return
95 Signature objects are *immutable*. Use :meth:`Signature.replace` to make a
98 .. attribute:: Signature.empty
102 .. attribute:: Signature.parameters
107 .. attribute:: Signature.return_annotation
110 annotation, this attribute is set to :attr:`Signature.empty`.
112 .. method:: Signature.bind(*args, **kwargs)
116 signature, or raises a :exc:`TypeError`.
118 .. method:: Signature.bind_partial(*args, **kwargs)
120 Works the same way as :meth:`Signature.bind`, but allows the omission of
123 passed arguments do not match the signature.
125 .. method:: Signature.replace(*[, parameters][, return_annotation])
127 Create a new Signature instance based on the instance replace was invoked
130 signature. To remove return_annotation from the copied Signature, pass in
131 :attr:`Signature.empty`.
137 >>> sig = signature(test)
212 >>> sig = signature(foo)
242 Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call.
252 Should be used in conjunction with :attr:`Signature.parameters` for any
257 Arguments for which :meth:`Signature.bind` or
258 :meth:`Signature.bind_partial` relied on a default value are skipped.
266 >>> sig = signature(foo)
296 sig = signature(test)
303 :pep:`362` - Function Signature Object.