From f235178beccf5eb5b47e770240f32d9ba24b26fd Mon Sep 17 00:00:00 2001 From: Howie Zhao Date: Sat, 13 Aug 2022 12:23:33 +0800 Subject: gh-94439: typing docs: Add minimum version to `__required_keys__` and `__optional_keys__` (#95373) --- Doc/library/typing.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 4d422f5..c6dd697 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1825,6 +1825,9 @@ These are not used in annotations. They are building blocks for declaring types. True .. attribute:: __required_keys__ + + .. versionadded:: 3.9 + .. attribute:: __optional_keys__ ``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. >>> Point3D.__optional_keys__ == frozenset({'x', 'y'}) True + .. versionadded:: 3.9 + See :pep:`589` for more examples and detailed rules of using ``TypedDict``. .. versionadded:: 3.8 -- cgit v0.12