Skip to content

Commit 3dc4d20

Browse files
committed
Add cover note to consistency section
Make it clear that the new consistency rules should match the existing rules for any types not using the new features.
1 parent 1c533b5 commit 3dc4d20

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

peps/pep-0705.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ Finally, subclasses can have ``other_keys=Never`` even if the superclass does no
371371
Type consistency
372372
----------------
373373

374+
*This section updates the type consistency rules introduced in :pep:`589` to cover the new features in this PEP. In particular, any pair of types that do not use the new features will be consistent under these new rules if (and only if) they were already consistent.*
375+
374376
A TypedDict type with ``other_keys=Never`` is consistent with ``Mapping[str, V]``, where ``V`` is the union of all its value types. For instance, the following type is consistent with ``Mapping[str, int | str]``::
375377

376378
class Person(TypedDict, other_keys=Never):

0 commit comments

Comments
 (0)