We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e3e456 commit 8cd038aCopy full SHA for 8cd038a
1 file changed
Doc/reference/datamodel.rst
@@ -2468,7 +2468,10 @@ The appropriate metaclass for a class definition is determined in two steps:
2468
2469
* if no bases and no explicit metaclass are given, then :func:`type` is used
2470
as candidate;
2471
- * if bases are defined, the metaclass of the first base is used as candidate;
+ * if an explicit metaclass is given and it is an instance of :func:`type`,
2472
+ then it is used as candidate;
2473
+ * if bases are defined but no explicit metaclass, the metaclass of the first
2474
+ base is used as candidate;
2475
* if an explicit metaclass is given and it is *not* an instance of
2476
:func:`type`, then it is used directly as the metaclass and step 2 is skipped.
2477
0 commit comments