mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-87390: Add __unpacked__ attribute to types.GenericAlias (#92059)
This commit is contained in:
parent
56f9844014
commit
ff88f7e007
4 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue