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