https://github.com/python/cpython/commit/c46ad20d41a95d0c621d9aa79e829fad9654b381 commit: c46ad20d41a95d0c621d9aa79e829fad9654b381 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: ambv <[email protected]> date: 2024-09-06T15:45:22+02:00 summary:
[3.13] gh-123207: Clarify the documentation for the mro lookup for super() (GH-123417) (#123732) (cherry picked from commit 327463aef173a1cb9659bccbecfff4530bbe6bbf) Co-authored-by: Pieter Eendebak <[email protected]> files: M Doc/library/functions.rst diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index fe58394c3fcc80..2568b4349589c7 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -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 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
