From 85a9c63f42254d5a1c94df65ad7ada1156c51246 Mon Sep 17 00:00:00 2001 From: howiezhao Date: Thu, 28 Jul 2022 18:44:42 +0800 Subject: [PATCH 1/2] docs: update typing library documentation --- Doc/library/typing.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 4d422f539ad184..a8dc5226e8b193 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1825,6 +1825,8 @@ 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 +1854,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 From 3d9eff25d29cf9d783a04ed9664e6d651ee7a7ab Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 12 Aug 2022 20:37:33 -0700 Subject: [PATCH 2/2] Update Doc/library/typing.rst --- Doc/library/typing.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index a8dc5226e8b193..c6dd6976f23606 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1827,6 +1827,7 @@ These are not used in annotations. They are building blocks for declaring types. .. attribute:: __required_keys__ .. versionadded:: 3.9 + .. attribute:: __optional_keys__ ``Point2D.__required_keys__`` and ``Point2D.__optional_keys__`` return