You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: peps/pep-0800.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,11 +62,11 @@ incorrect in general, as discussed in more detail :ref:`below <pep-800-mypy-inco
62
62
The experimental ``ty`` type checker uses a third approach that aligns more closely with the :ref:`runtime behavior of Python <pep-800-solid-bases-cpython>`:
63
63
it recognizes certain classes as "solid bases" that restrict multiple inheritance. Broadly speaking, every class must
64
64
inherit from at most one unique solid base, and if there is no unique solid base, the class cannot exist; we'll provide a more
65
-
precise definition below. However, ty's approach relies on hardcoded knowledge of particular built-in types.
65
+
precise definition below. However, ty's approach relies on hardcoded knowledge of particular built-in types. The term "solid base" derives from the
66
+
CPython implementation; this PEP uses the newly proposed term "disjoint base" instead.
66
67
67
68
This PEP proposes an extension to the type system that makes it possible to express when multiple inheritance is not
68
-
allowed at runtime: an ``@disjoint_base`` decorator that marks a classes as a *disjoint base*, the term we introduce
69
-
in preference to the term "solid base".
69
+
allowed at runtime: an ``@disjoint_base`` decorator that marks a classes as a *disjoint base*.
70
70
This gives type checkers a more precise understanding of reachability, and helps in several concrete areas.
0 commit comments