[Python-checkins] peps: Another update from Yury for PEP 362.
brett.cannon
python-checkins at python.org
Thu Jun 7 16:25:43 CEST 2012
http://hg.python.org/peps/rev/13f360c76e50
changeset: 4458:13f360c76e50
user: Brett Cannon <brett at python.org>
date: Thu Jun 07 10:25:42 2012 -0400
summary:
Another update from Yury for PEP 362.
files:
pep-0362.txt | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/pep-0362.txt b/pep-0362.txt
--- a/pep-0362.txt
+++ b/pep-0362.txt
@@ -160,11 +160,16 @@
- 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
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list