[3.13] gh-123207: Clarify the documentation for the mro lookup for super() (GH-123417) (#123732)

(cherry picked from commit 327463aef1)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-09-06 15:45:22 +02:00 committed by GitHub
parent 402b5f204a
commit c46ad20d41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -1954,10 +1954,10 @@ are always available. They are listed here in alphabetical order.
``D -> B -> C -> A -> object`` and the value of *type* is ``B``,
then :func:`super` searches ``C -> A -> object``.
The :attr:`~class.__mro__` attribute of the *object_or_type* lists the method
resolution search order used by both :func:`getattr` and :func:`super`. The
attribute is dynamic and can change whenever the inheritance hierarchy is
updated.
The :attr:`~class.__mro__` attribute of the class corresponding to
*object_or_type* lists the method resolution search order used by both
:func:`getattr` and :func:`super`. The attribute is dynamic and can change
whenever the inheritance hierarchy is updated.
If the second argument is omitted, the super object returned is unbound. If
the second argument is an object, ``isinstance(obj, type)`` must be true. If