PEP 604
E901490
PEP 604 is a Python Enhancement Proposal that introduced the modern, concise syntax for expressing type unions (using the `|` operator) in Python’s type hints.
All labels observed (1)
| Label | Occurrences |
|---|---|
| PEP 604 canonical | 2 |
How this entity was disambiguated
This entity first appeared as the object of triple T10763894 — resolving that mention is where its identity was fixed. The disambiguator weighed these candidate entities and picked the highlighted one (or “None”, minting a new entity). This is how homonymy is resolved: the same surface form can point to different entities.
Target entity: PEP 604 Context triple: [Python 3.10, implementsPEP, PEP 604]
-
A.
PEP 634
PEP 634 is the Python Enhancement Proposal that formally specifies the semantics of structural pattern matching introduced in Python 3.10.
-
B.
PEP 695
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.
-
C.
PEP 622
PEP 622 is a Python Enhancement Proposal that introduced the design for structural pattern matching syntax later adopted in Python 3.10.
-
D.
PEP 636
PEP 636 is a Python Enhancement Proposal that serves as a tutorial-style guide to the structural pattern matching feature introduced in Python 3.10.
-
E.
PEP 635
PEP 635 is a Python Enhancement Proposal that provides a detailed rationale and motivation for the structural pattern matching feature introduced in Python 3.10.
- F. None of above. chosen
- G. Unsure - the case is ambiguous/there is not enough information to decide.
Target entity: PEP 604 Target entity description: PEP 604 is a Python Enhancement Proposal that introduced the modern, concise syntax for expressing type unions (using the `|` operator) in Python’s type hints.
-
A.
PEP 634
PEP 634 is the Python Enhancement Proposal that formally specifies the semantics of structural pattern matching introduced in Python 3.10.
-
B.
PEP 695
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.
-
C.
PEP 622
PEP 622 is a Python Enhancement Proposal that introduced the design for structural pattern matching syntax later adopted in Python 3.10.
-
D.
PEP 636
PEP 636 is a Python Enhancement Proposal that serves as a tutorial-style guide to the structural pattern matching feature introduced in Python 3.10.
-
E.
PEP 635
PEP 635 is a Python Enhancement Proposal that provides a detailed rationale and motivation for the structural pattern matching feature introduced in Python 3.10.
- F. None of above. chosen
Statements (36)
| Predicate | Object |
|---|---|
| instanceOf | Python Enhancement Proposal ⓘ |
| acceptedBy | Python core developers NERFINISHED ⓘ |
| affects | Python type hinting system ⓘ |
| appliesTo | typing.Optional via X | None ⓘ |
| author |
Jelle Zijlstra
NERFINISHED
ⓘ
Pradeep Kumar Srinivasan NERFINISHED ⓘ Łukasz Langa NERFINISHED ⓘ |
| category | Typing ⓘ |
| clarifies |
how unions are represented at runtime
ⓘ
interaction of | with existing typing constructs ⓘ |
| createdForVersion | Python 3.10 NERFINISHED ⓘ |
| defines |
behavior of | operator on types at runtime
ⓘ
semantics of X | Y for typing ⓘ |
| discusses | backwards compatibility of union syntax ⓘ |
| documentedAt | https://peps.python.org/pep-0604/ ⓘ |
| governs | syntax of union types in standard library type hints ⓘ |
| hasNumber | 604 ⓘ |
| hasTitle | Allow writing union types as X | Y ⓘ |
| influences |
type checkers such as Pyre
ⓘ
type checkers such as mypy ⓘ type checkers such as pyright ⓘ |
| introducedIn | Python 3.10 NERFINISHED ⓘ |
| language | Python NERFINISHED ⓘ |
| motivation |
make type hints more readable
ⓘ
reduce verbosity of typing.Union ⓘ |
| proposesFeature |
modern concise syntax for type unions
ⓘ
using | operator for type unions in type hints ⓘ |
| recommends | preferring X | Y over typing.Union[X, Y] in new code ⓘ |
| relatedTo |
PEP 563
NERFINISHED
ⓘ
PEP 585 NERFINISHED ⓘ PEP 649 NERFINISHED ⓘ |
| replacesSyntax | typing.Union[X, Y] with X | Y ⓘ |
| scope | static type checking ⓘ |
| standardizes | use of | for unions across typing ecosystem ⓘ |
| status | Final ⓘ |
| usesOperator | bitwise or operator | ⓘ |
How these facts were elicited
The pipeline generated the facts above by prompting gpt-5.1 with this entity's name + description and the instruction below.
You are a knowledge base construction expert. Given a subject entity and a description of it, return factual statements that you know for the subject as a JSON list of dictionaries(triples), where keys must be "subject", "predicate" and "object". The number of facts may be very high, between 25 to 50 or more, for very popular subjects. For less popular subjects, the number of facts can be very low, like 5 or 10. # Requirements - If you don't know the subject at all, return an empty list. - If the subject is not a named entity, return an empty list. - Include at least one triple where predicate is "instanceOf". - Do not get too wordy. - Separate several objects into multiple triples with one object.
Subject: PEP 604 Description of subject: PEP 604 is a Python Enhancement Proposal that introduced the modern, concise syntax for expressing type unions (using the `|` operator) in Python’s type hints.
Referenced by (2)
Full triples — surface form annotated when it differs from this entity's canonical label.