Type Parameter Syntax

E265437

Type Parameter Syntax is the Python language feature introduced by PEP 695 that provides a concise, built-in way to declare and use type parameters for generics directly in function, class, and type alias definitions.

All labels observed (1)

Label Occurrences
Type Parameter Syntax canonical 1

How this entity was disambiguated

Statements (38)

Predicate Object
instanceOf Python language feature ⓘ
type system feature ⓘ
affects static type checkers for Python ⓘ
allows declaration of type parameters inline with class name ⓘ
declaration of type parameters inline with function name ⓘ
declaration of type parameters inline with type alias name ⓘ
category Python generics ⓘ
Python typing ⓘ
compatibleWith existing TypeVar-based generics ⓘ
designMotivation avoid separate TypeVar declarations far from their use ⓘ
unify generic syntax across functions, classes, and type aliases ⓘ
documentedIn PEP 695: Type Parameter Syntax ⓘ
linked to: PEP 695
enables clearer declaration of higher-order generics ⓘ
more expressive generic type aliases ⓘ
goal improve static type checking of generics ⓘ
make generics easier to read ⓘ
reduce boilerplate for generic code ⓘ
influences style of modern Python generic code ⓘ
introducedBy PEP 695 ⓘ
introducedInLanguage Python ⓘ
partOf Python typing enhancements introduced after PEP 484 ⓘ
provides built-in syntax for generics ⓘ
concise way to declare type parameters ⓘ
relatedTo ParamSpec ⓘ
TypeVar ⓘ
TypeVarTuple ⓘ
replaces typing.TypeVar-based generic parameter declarations in many cases ⓘ
standardizedIn Python type system ⓘ
status accepted PEP feature ⓘ
supports bounds on type parameters ⓘ
constraints on type parameters ⓘ
default values for type parameters ⓘ
generic programming ⓘ
variance annotations for type parameters ⓘ
syntaxStyle square-bracket parameter list after the name ⓘ
usedIn class definitions ⓘ
function definitions ⓘ
type alias definitions ⓘ

How these facts were elicited

Referenced by (1)

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

PEP 695 → hasTitle → Type Parameter Syntax ⓘ