PEP 560

E935160

PEP 560 is a Python Enhancement Proposal that optimizes and refines the implementation of typing and generic types in Python, improving performance and simplifying the internal mechanics of the typing module.

All labels observed (2)

How this entity was disambiguated

Statements (46)

Predicate Object
instanceOf Python Enhancement Proposal
affects how typing module constructs parameterized types
internal representation of typing generics
affectsModule typing
aimsTo improve performance of typing operations
simplify internal mechanics of typing module
author Ivan Levkivskyi
backwardsCompatibility largely backwards compatible at the public API level
category Typing
linked to: typing
changes how subscripting of generic classes is implemented
clarifies interaction between generics and metaclasses
semantics of generic aliases
createdForVersion Python 3.7
defines __class_getitem__ protocol
discusses backwards compatibility for typing generics
impact on runtime introspection of typing constructs
impact on static type checkers
migration path for third-party typing libraries
enables more efficient implementation of typing module
third-party libraries to hook into generic type machinery
focusesOn core support for typing module
generic types
hasNumber 560
hasTitle Core support for typing module and generic types
implementedIn CPython 3.7
linked to: Python 3.7
improves import-time performance of typing-heavy code
performance of generic type parameter substitution
performance of isinstance checks involving typing generics
performance of issubclass checks involving typing generics
introduces new C-level protocol for generic types
language Python
modifies implementation of typing.AbstractGenericAlias (internal)
implementation of typing.Generic
motivation need for better support of generic types in CPython core
typing module was slow and complex internally
reduces overhead of generic alias creation
overhead of runtime type checks in typing module
relatedTo PEP 484
PEP 544
PEP 585
replaces pure-Python generic type machinery with optimized core support
repository https://peps.python.org/pep-0560/
standardizes low-level API for generic types
status Final
targetImplementation CPython
type Standards Track

How these facts were elicited

Referenced by (5)

Full triples — surface form annotated when it differs from this entity's canonical label.

typing (Python module) relatedPEP PEP 560
subject linked to: typing
typing extendedByPEP PEP 560
subject linked to: Python typing module
Python 3.7 implementsPEP PEP 560 (Core support for typing module and generic types)
linked to: PEP 560
PEP 483 relatedTo PEP 560