Skip to content

Commit 1fccb1d

Browse files
[3.11] gh-94439: typing docs: Add minimum version to __required_keys__ and __optional_keys__ (GH-95373) (#95944)
Co-authored-by: Howie Zhao <[email protected]>
1 parent 6369099 commit 1fccb1d

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
@@ -1825,6 +1825,9 @@ These are not used in annotations. They are building blocks for declaring types.
18251825
True
18261826

18271827
.. attribute:: __required_keys__
1828+
1829+
.. versionadded:: 3.9
1830+
18281831
.. attribute:: __optional_keys__
18291832

18301833
``Point2D.__required_keys__`` and ``Point2D.__optional_keys__`` return
@@ -1852,6 +1855,8 @@ These are not used in annotations. They are building blocks for declaring types.
18521855
>>> Point3D.__optional_keys__ == frozenset({'x', 'y'})
18531856
True
18541857

1858+
.. versionadded:: 3.9
1859+
18551860
See :pep:`589` for more examples and detailed rules of using ``TypedDict``.
18561861

18571862
.. versionadded:: 3.8

0 commit comments

Comments
 (0)