[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

Serhiy Storchaka report at bugs.python.org
Sat Jul 31 13:50:22 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

There is also similar bug in Generic:

>>> from typing import *
>>> T = TypeVar("T")
>>> P = ParamSpec("P")
>>> class X(Generic[T, P]):
...     f: Callable[P, int]
...     x: T
... 
>>> P_2 = ParamSpec("P_2")
>>> X[int, P_2, str]
__main__.X[int, ~P_2]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44796>
_______________________________________


More information about the Python-bugs-list mailing list