PEP 695
E52336
PEP 695 is a Python Enhancement Proposal that introduces a new, more concise syntax for type parameter declarations to improve the language’s support for generics and static typing.
Statements (34)
| Predicate | Object |
|---|---|
| instanceOf | Python Enhancement Proposal ⓘ |
| affects |
Python generic class definitions
ⓘ
Python generic function definitions ⓘ Python type checkers ⓘ |
| aimsTo |
improve static typing in Python
ⓘ
improve support for generics in Python ⓘ |
| belongsTo |
Python type system
ⓘ
Pydantic ⓘ
surface form:
Python typing ecosystem
|
| category | Typing ⓘ |
| defines |
syntax for declaring type parameters on classes
ⓘ
syntax for declaring type parameters on functions ⓘ syntax for declaring type parameters on type aliases ⓘ |
| documentationURL | https://peps.python.org/pep-0695/ ⓘ |
| focusesOn | type parameter declarations ⓘ |
| governs | how type parameters are declared in source code ⓘ |
| hasTitle | Type Parameter Syntax ⓘ |
| improves |
ergonomics of static typing in Python
ⓘ
readability of generic type declarations ⓘ |
| intendedFor |
Python application developers
ⓘ
Python library authors ⓘ static type checker implementers ⓘ |
| introduces | more concise syntax for type parameters ⓘ |
| language | Python ⓘ |
| motivatedBy |
need for clearer generic APIs
ⓘ
verbosity of existing typing.Generic-based syntax ⓘ |
| number | 695 ⓘ |
| proposes | new syntax for type parameter declarations in Python ⓘ |
| relatedTo |
PEP 484
ⓘ
PEP 585 ⓘ Python standard library ⓘ
surface form:
Python typing module
|
| scope |
generic programming in Python
ⓘ
static type checking ⓘ |
| status | Accepted ⓘ |
| targets | Python generic types ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.