-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Enhance TypedDict docs around required/optional keys #109547
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
Conversation
As discussed in comments to python#109544, the semantics of this attribute are somewhat confusing. Add a note explaining its limitations and steering users towards __required_keys__ and __optional_keys__ instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a good idea to soft-deprecate __total__
in the docs at this point, because it does not do what it promises to do.
There's no use-case left for it.
Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
As discussed in comments to pythonGH-109544, the semantics of this attribute are somewhat confusing. Add a note explaining its limitations and steering users towards __required_keys__ and __optional_keys__ instead. (cherry picked from commit f49958c) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
GH-109982 is a backport of this pull request to the 3.12 branch. |
GH-109983 is a backport of this pull request to the 3.11 branch. |
As discussed in comments to pythonGH-109544, the semantics of this attribute are somewhat confusing. Add a note explaining its limitations and steering users towards __required_keys__ and __optional_keys__ instead. (cherry picked from commit f49958c) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
… (#109983) As discussed in comments to GH-109544, the semantics of this attribute are somewhat confusing. Add a note explaining its limitations and steering users towards __required_keys__ and __optional_keys__ instead. (cherry picked from commit f49958c) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
As discussed in comments to python#109544, the semantics of this attribute are somewhat confusing. Add a note explaining its limitations and steering users towards __required_keys__ and __optional_keys__ instead.
… (#109982) Enhance TypedDict docs around required/optional keys (GH-109547) As discussed in comments to GH-109544, the semantics of this attribute are somewhat confusing. Add a note explaining its limitations and steering users towards __required_keys__ and __optional_keys__ instead. (cherry picked from commit f49958c) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
As discussed in comments to python#109544, the semantics of this attribute are somewhat confusing. Add a note explaining its limitations and steering users towards __required_keys__ and __optional_keys__ instead.
📚 Documentation preview 📚: https://cpython-previews--109547.org.readthedocs.build/