File tree 1 file changed +9
-5
lines changed 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -2086,11 +2086,15 @@ When a class definition is executed, the following steps occur:
2086
2086
Resolving MRO entries
2087
2087
^^^^^^^^^^^^^^^^^^^^^
2088
2088
2089
- If a base that appears in class definition is not an instance of :class: `type `,
2090
- then an ``__mro_entries__ `` method is searched on it. If found, it is called
2091
- with the original bases tuple. This method must return a tuple of classes that
2092
- will be used instead of this base. The tuple may be empty, in such case
2093
- the original base is ignored.
2089
+ .. method :: object.__mro_entries__(self, bases)
2090
+
2091
+ If a base that appears in a class definition is not an instance of
2092
+ :class: `type `, then an ``__mro_entries__ `` method is searched on the base.
2093
+ If an ``__mro_entries__ `` method is found, the base is substituted with the
2094
+ 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
2096
+ of classes that will be used instead of the base. The returned tuple may be
2097
+ empty: in these cases, the original base is ignored.
2094
2098
2095
2099
.. seealso ::
2096
2100
You can’t perform that action at this time.
0 commit comments