From 327463aef173a1cb9659bccbecfff4530bbe6bbf Mon Sep 17 00:00:00 2001 From: Pieter Eendebak Date: Thu, 5 Sep 2024 15:52:04 +0200 Subject: [PATCH] gh-123207: Clarify the documentation for the mro lookup for super() (GH-123417) --- Doc/library/functions.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 2c55f2b508b..b2b0086437f 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1965,10 +1965,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