Skip to content
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

TypedDict: clarify that a non-ReadOnly key cannot be redeclared as ReadOnly. #1859

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/spec/typeddict.rst
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,8 @@ only if all of the following are satisfied:
* For each item in ``A``, if ``B`` has the corresponding key, the corresponding
value type in ``B`` is assignable to the value type in ``A``.
* For each non-read-only item in ``A``, its value type is assignable to the
corresponding value type in ``B``.
corresponding value type in ``B``, and the corresponding key is not read-only
in ``B``.
* For each required key in ``A``, the corresponding key is required in ``B``.
* For each non-required key in ``A``, if the item is not read-only in ``A``,
the corresponding key is not required in ``B``.
Expand Down