-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 695 syntax doesn't work for generic NamedTuples #104616
Comments
I guess we need to add Lines 2668 to 2673 in cfa517d
|
Thanks! I'll take a look tonight (though feel free to propose a solution yourself if you can get to it earlier). Adding to |
Ah. I agree that the generated class should have the correct |
Yes, it probably should be writable; I thought it already was. I can make that change. |
Fixed in #104634 |
Since Python 3.11, defining generic
NamedTuple
s has been legal, like so:However, using the new PEP-695 syntax for generic
NamedTuple
s fails with a slightly inexplicable error message:Using PEP-695 syntax for generic
TypedDict
s seems to work fine, but isn't tested anywhere intest_typing.py
, as far as I can tell:Cc. @JelleZijlstra
The text was updated successfully, but these errors were encountered: