8000 [doc] Clarify MRO precedence in descriptor super binding section (GH-… · python/cpython@81a3829 · GitHub
[go: up one dir, main page]

Skip to content

Commit 81a3829

Browse files
[doc] Clarify MRO precedence in descriptor super binding section (GH-29539) (GH-29670)
A similar sentence is present in the 'Invocation from super' section of the descriptor HOWTO, where it is already correct. (cherry picked from commit ee49484) Co-authored-by: Jouke Witteveen <j.witteveen@gmail.com>
1 parent f8eebb0 commit 81a3829

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/reference/datamodel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ Class Binding
17761776
Super Binding
17771777
If ``a`` is an instance of :class:`super`, then the binding ``super(B, obj).m()``
17781778
searches ``obj.__class__.__mro__`` for the base class ``A``
1779-
immediately preceding ``B`` and then invokes the descriptor with the call:
1779+
immediately following ``B`` and then invokes the descriptor with the call:
17801780
``A.__dict__['m'].__get__(obj, obj.__class__)``.
17811781

17821782
For instance bindings, the precedence of descriptor invocation depends on

0 commit comments

Comments
 (0)
0