Documentation
I found the leading sentence in this paragraph a little misleading:
|
The :attr:`~class.__mro__` attribute of the *object_or_type* lists the method |
because if the
object_or_type is an object, it won't have
__mro__ attribute. The attribute should be
object.__class__.__mro__.
On the other hand, if object_or_type is a type (class), then __mro__ attribute does exist.
Linked PRs
Documentation
I found the leading sentence in this paragraph a little misleading:
cpython/Doc/library/functions.rst
Line 1961 in ec89620
because if the
object_or_typeis an object, it won't have__mro__attribute. The attribute should beobject.__class__.__mro__.On the other hand, if
object_or_typeis a type (class), then__mro__attribute does exist.Linked PRs