[Python-checkins] cpython (merge 3.1 -> 3.2): Issue 10988: fix description of super's descriptor call.

raymond.hettinger python-checkins at python.org
Tue Mar 22 23:34:10 CET 2011


http://hg.python.org/cpython/rev/40698c68a32c
changeset:   68843:40698c68a32c
branch:      3.2
parent:      68831:f3b8ebf28011
parent:      68842:3e3c46a3dce8
user:        Raymond Hettinger <python at rcn.com>
date:        Tue Mar 22 15:33:02 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
@@ -1418,7 +1418,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