Skip to content

Commit

Permalink
TypedDict: clarify that a non-ReadOnly key cannot be redeclared as Re…
Browse files Browse the repository at this point in the history
  • Loading branch information
rchen152 authored Sep 27, 2024
1 parent d93fba9 commit 0f38667
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 0f38667

Please sign in to comment.