We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 should be possible to copy a TypedDict via a copy constructor like:
point2 = Point(point1)
Currently this is rejected by the type checker.
It may also be desirable to support the following:
point2d = Point2D(point3d)
...although I'd have to think about whether this is actually typesafe and consistent.
Suggested tags for this issue: feature, topic-typed-dict
The text was updated successfully, but these errors were encountered:
point2d = Point2D(point3d) should be okay since we have structural subtyping for typed dicts.
Sorry, something went wrong.
point2d = Point2D(point3d) would copy every field of point3d during runtime. Let's just focus on the same typeddict first.
point3d
I just checked the PEP589, non-keyword arguments are not allowed when TypedDict is used as a callable object:
It can be used as a callable object with keyword arguments corresponding to the TypedDict items. Non-keyword arguments are not allowed.
No branches or pull requests
It should be possible to copy a TypedDict via a copy constructor like:
Currently this is rejected by the type checker.
It may also be desirable to support the following:
...although I'd have to think about whether this is actually typesafe and consistent.
Suggested tags for this issue: feature, topic-typed-dict
The text was updated successfully, but these errors were encountered: