mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Issue 10988: fix description of super's descriptor call.
This commit is contained in:
parent
4fbd88a078
commit
b76f6200d2
1 changed files with 1 additions and 1 deletions
|
@ -1608,7 +1608,7 @@ Super Binding
|
||||||
If ``a`` is an instance of :class:`super`, then the binding ``super(B,
|
If ``a`` is an instance of :class:`super`, then the binding ``super(B,
|
||||||
obj).m()`` searches ``obj.__class__.__mro__`` for the base class ``A``
|
obj).m()`` searches ``obj.__class__.__mro__`` for the base class ``A``
|
||||||
immediately preceding ``B`` and then invokes the descriptor with the call:
|
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
|
For instance bindings, the precedence of descriptor invocation depends on the
|
||||||
which descriptor methods are defined. A descriptor can define any combination
|
which descriptor methods are defined. A descriptor can define any combination
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue