Skip to content

Commit a372a7d

Browse files
gh-94439: typing docs: Add minimum version to __required_keys__ and __optional_keys__ (GH-95373)
(cherry picked from commit f235178) Co-authored-by: Howie Zhao <[email protected]>
1 parent 83bde57 commit a372a7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/typing.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,9 @@ These are not used in annotations. They are building blocks for declaring types.
15441544
True
15451545

15461546
.. attribute:: __required_keys__
1547+
1548+
.. versionadded:: 3.9
1549+
15471550
.. attribute:: __optional_keys__
15481551

15491552
``Point2D.__required_keys__`` and ``Point2D.__optional_keys__`` return
@@ -1566,6 +1569,8 @@ These are not used in annotations. They are building blocks for declaring types.
15661569
>>> Point3D.__optional_keys__ == frozenset({'x', 'y'})
15671570
True
15681571

1572+
.. versionadded:: 3.9
1573+
15691574
See :pep:`589` for more examples and detailed rules of using ``TypedDict``.
15701575

15711576
.. versionadded:: 3.8

0 commit comments

Comments
 (0)