gh-87390: Add __unpacked__ attribute to types.GenericAlias (#92059)

This commit is contained in:
Jelle Zijlstra 2022-05-02 13:21:59 -06:00 committed by GitHub
parent 56f9844014
commit ff88f7e007
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 0 deletions

View file

@ -5055,6 +5055,15 @@ All parameterized generics implement special read-only attributes.
have correct ``__parameters__`` after substitution because
:class:`typing.ParamSpec` is intended primarily for static type checking.
.. attribute:: genericalias.__unpacked__
A boolean that is true if the alias has been unpacked using the
``*`` operator (see :data:`~typing.TypeVarTuple`).
.. versionadded:: 3.11
.. seealso::
:pep:`484` - Type Hints