PEP 585: Explain the choice of GenericAlias over GenericType (#1319)

Per Nick's explanation on python-dev.
This commit is contained in:
Guido van Rossum 2020-02-25 15:54:58 -08:00 committed by GitHub
parent b674d3ae26
commit 4ecaa6c00a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -339,6 +339,14 @@ been useful, however implementing the type checker within Python that
would deal with complex types, nested type checking, type variables,
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
=========================