[Python-checkins] cpython (2.7): Issue 10988: fix description of super's descriptor call.
raymond.hettinger
python-checkins at python.org
Tue Mar 22 23:29:22 CET 2011
http://hg.python.org/cpython/rev/50cc60852a76
changeset: 68841:50cc60852a76
branch: 2.7
parent: 68836:b8e556541db3
user: Raymond Hettinger <python at rcn.com>
date: Tue Mar 22 15:28:45 2011 -0700
summary:
Issue 10988: fix description of super's descriptor call.
files:
Doc/reference/datamodel.rst
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1608,7 +1608,7 @@
If ``a`` is an instance of :class:`super`, then the binding ``super(B,
obj).m()`` searches ``obj.__class__.__mro__`` for the base class ``A``
immediately preceding ``B`` and then invokes the descriptor with the call:
- ``A.__dict__['m'].__get__(obj, A)``.
+ ``A.__dict__['m'].__get__(obj, obj.__class__)``.
For instance bindings, the precedence of descriptor invocation depends on the
which descriptor methods are defined. A descriptor can define any combination
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list