Another update from Yury for PEP 362.
This commit is contained in:
parent
e843de4699
commit
a0f82b8887
|
@ -160,11 +160,16 @@ The function implements the following algorithm:
|
|||
|
||||
- Or else construct a new ``Signature`` object and return it
|
||||
|
||||
- if the object is a method, construct and return a new ``Signature``
|
||||
object, with its first parameter (usually ``self``) removed
|
||||
- if the object is a method or a classmethod, construct and return
|
||||
a new ``Signature`` object, with its first parameter (usually
|
||||
``self`` or ``cls``) removed
|
||||
|
||||
- If the object is a class return ``signature(object.__init__)``
|
||||
|
||||
- If the object is an instance of ``functools.partial``, construct
|
||||
a new ``Signature`` from its ``partial.func`` attribute, and
|
||||
account for already bound ``partial.args`` and ``partial.kwargs``
|
||||
|
||||
- Return ``signature(object.__call__)``
|
||||
|
||||
Note, that the ``Signature`` object is created in a lazy manner, and
|
||||
|
|
Loading…
Reference in New Issue