We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
It was proposed by Guido to add the following syntax:
Point = typing.NamedTuple('Point', x=int, y=int) p = Point(x=1, y=2) p.x
I also like it. Probably, we should also support it for TypedDict.
TypedDict
The text was updated successfully, but these errors were encountered:
Seems reasonable, though if NamedTuple already supports keyword arguments, there may be some ambiguity. And this is a Python 3.6+ only feature.
NamedTuple
Sorry, something went wrong.
Allow keyword syntax for NamedTuple (#321)
4327f9b
Fixes #302 Example: Employee = NamedTuple('Employee', name=str, id=int) Note that this requires 3.6+ since order of kwargs should be preserved.
No branches or pull requests
It was proposed by Guido to add the following syntax:
I also like it. Probably, we should also support it for
TypedDict
.The text was updated successfully, but these errors were encountered: