peps
peps copied to clipboard
PEP 747: More precise discussion of subtyping
These paragraphs don't properly reflect the notion of "subtyping" in the spec. I reworded them to align more explicitly with the way assignability and subtyping are defined in the spec.
In particular, the subtyping relation exists only for fully static types. This makes the statement "TypeForm is a subtype of object" suspect: TypeForm by itself is TypeForm[Any], which is not a fully static type and therefore doesn't participate in subtyping.
📚 Documentation preview 📚: https://pep-previews--4465.org.readthedocs.build/