Skip to content

Commit f22371a

Browse files
committed
pythongh-103373: __mro_entries__ docs: improve cross references
1 parent 8317d51 commit f22371a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Doc/library/types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Dynamic Type Creation
7575

7676
This function looks for items in *bases* that are not instances of
7777
:class:`type`, and returns a tuple where each such object that has
78-
an ``__mro_entries__`` method is replaced with an unpacked result of
78+
an :meth:`~object.__mro_entries__` method is replaced with an unpacked result of
7979
calling this method. If a *bases* item is an instance of :class:`type`,
8080
or it doesn't have an ``__mro_entries__`` method, then it is included in
8181
the return tuple unchanged.

Doc/reference/datamodel.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,13 +2092,18 @@ Resolving MRO entries
20922092
:class:`type`, then an ``__mro_entries__`` method is searched on the base.
20932093
If an ``__mro_entries__`` method is found, the base is substituted with the
20942094
result of a call to ``__mro_entries__`` when creating the class.
2095-
The method is called with the original bases tuple, and must return a tuple
2095+
The method is called with the original bases tuple
2096+
passed to the *bases* parameter, and must return a tuple
20962097
of classes that will be used instead of the base. The returned tuple may be
20972098
empty: in these cases, the original base is ignored.
20982099

20992100
.. seealso::
21002101

2101-
:pep:`560` - Core support for typing module and generic types
2102+
:func:`types.resolve_bases`
2103+
Dynamically resolve bases that are not instances of :class:`type`.
2104+
2105+
:pep:`560`
2106+
Core support for typing module and generic types
21022107

21032108

21042109
Determining the appropriate metaclass

0 commit comments

Comments
 (0)