PEP 585: Explain the choice of GenericAlias over GenericType (#1319)
Per Nick's explanation on python-dev.
This commit is contained in:
parent
b674d3ae26
commit
4ecaa6c00a
|
@ -339,6 +339,14 @@ been useful, however implementing the type checker within Python that
|
||||||
would deal with complex types, nested type checking, type variables,
|
would deal with complex types, nested type checking, type variables,
|
||||||
string forward references, and so on is out of scope for this PEP.
|
string forward references, and so on is out of scope for this PEP.
|
||||||
|
|
||||||
|
Naming the type ``GenericType`` instead of ``GenericAlias``
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
We considered a different name for this type, but decided
|
||||||
|
``GenericAlias`` is better -- these aren't real types, they are
|
||||||
|
aliases for the corresponding container type with some extra metadata
|
||||||
|
attached.
|
||||||
|
|
||||||
|
|
||||||
Note on the initial draft
|
Note on the initial draft
|
||||||
=========================
|
=========================
|
||||||
|
|
Loading…
Reference in New Issue