[issue43923] Can't create generic NamedTuple as of py3.9

Jelle Zijlstra report at bugs.python.org
Fri Mar 4 21:57:54 EST 2022


Jelle Zijlstra <jelle.zijlstra at gmail.com> added the comment:

It doesn't really. If you do `x = New([1], (2, 3))` you get:

main.py:11: error: List item 0 has incompatible type "int"; expected "T"
main.py:11: error: Argument 2 to "New" has incompatible type "Tuple[int, int]"; expected "Tuple[T, T]"

https://mypy-play.net/?mypy=latest&python=3.10&gist=a13c7a33c55a3aeee95324d46cd03ffd

----------

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


More information about the Python-bugs-list mailing list