File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1556,13 +1556,14 @@ all other candidate metaclasses. If no such metaclass exists among the candidate
15561556the class cannot be created, as explained in :ref: `metaclass-determination `.
15571557
15581558Finally, the memory layouts of the bases must be compatible. This means that it must be
1559- possible to compute a *solid base * for the class. A class is a solid base if it has a
1560- nonempty :attr: `~object.__slots__ ` definition; some other classes may also be solid bases,
1561- depending on the Python implementation.
1559+ possible to compute a *solid base * for the class. Exactly which classes are solid bases
1560+ depends on the Python implementation.
15621561
15631562.. impl-detail ::
15641563
1565- In CPython, many but not all classes defined in C are solid bases, including most
1564+ In CPython, a class is a solid base if it has a
1565+ nonempty :attr: `~object.__slots__ ` definition.
1566+ Many but not all classes defined in C are also solid bases, including most
15661567 builtins (such as :class: `int ` or :class: `BaseException `)
15671568 but excluding most concrete :class: `Exception ` classes. Generally, a C class
15681569 is a solid base if its underlying struct is different in size from its base class.
Original file line number Diff line number Diff line change @@ -2629,7 +2629,7 @@ Notes on using *__slots__*:
26292629* :attr: `~object.__class__ ` assignment works only if both classes have the
26302630 same *__slots__ *.
26312631
2632- * :ref: `Multiple inheritance <tut- multiple >` with multiple slotted parent
2632+ * :ref: `Multiple inheritance <multiple-inheritance >` with multiple slotted parent
26332633 classes can be used,
26342634 but only one parent is allowed to have attributes created by slots
26352635 (the other bases must have empty slot layouts) - violations raise
You can’t perform that action at this time.
0 commit comments