Skip to content

Commit 407505d

Browse files
[3.12] pythongh-123207: Clarify the documentation for the mro lookup for super() (pythonGH-123417) (python#123733)
(cherry picked from commit 327463a) Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
1 parent 8eef5a8 commit 407505d

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
@@ -1885,10 +1885,10 @@ are always available. They are listed here in alphabetical order.
18851885
``D -> B -> C -> A -> object`` and the value of *type* is ``B``,
18861886
then :func:`super` searches ``C -> A -> object``.
18871887

1888-
The :attr:`~class.__mro__` attribute of the *object_or_type* lists the method
1889-
resolution search order used by both :func:`getattr` and :func:`super`. The
1890-
attribute is dynamic and can change whenever the inheritance hierarchy is
1891-
updated.
1888+
The :attr:`~class.__mro__` attribute of the class corresponding to
1889+
*object_or_type* lists the method resolution search order used by both
1890+
:func:`getattr` and :func:`super`. The attribute is dynamic and can change
1891+
whenever the inheritance hierarchy is updated.
18921892

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

0 commit comments

Comments
 (0)