Skip to content

Commit c46ad20

Browse files
[3.13] pythongh-123207: Clarify the documentation for the mro lookup for super() (pythonGH-123417) (python#123732)
(cherry picked from commit 327463a) Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
1 parent 402b5f2 commit c46ad20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,10 +1954,10 @@ are always available. They are listed here in alphabetical order.
19541954
``D -> B -> C -> A -> object`` and the value of *type* is ``B``,
19551955
then :func:`super` searches ``C -> A -> object``.
19561956

1957-
The :attr:`~class.__mro__` attribute of the *object_or_type* lists the method
1958-
resolution search order used by both :func:`getattr` and :func:`super`. The
1959-
attribute is dynamic and can change whenever the inheritance hierarchy is
1960-
updated.
1957+
The :attr:`~class.__mro__` attribute of the class corresponding to
1958+
*object_or_type* lists the method resolution search order used by both
1959+
:func:`getattr` and :func:`super`. The attribute is dynamic and can change
1960+
whenever the inheritance hierarchy is updated.
19611961

19621962
If the second argument is omitted, the super object returned is unbound. If
19631963
the second argument is an object, ``isinstance(obj, type)`` must be true. If

0 commit comments

Comments
 (0)