From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 13 Aug 2022 04:31:51 +0000 (-0700) Subject: gh-94439: typing docs: Add minimum version to `__required_keys__` and `__optional_key... X-Git-Tag: v3.10.7~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a372a7d65320396d44e8beb976e3a6c382963d4e;p=thirdparty%2FPython%2Fcpython.git gh-94439: typing docs: Add minimum version to `__required_keys__` and `__optional_keys__` (GH-95373) (cherry picked from commit f235178beccf5eb5b47e770240f32d9ba24b26fd) Co-authored-by: Howie Zhao --- diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 1b7cf31d7cde..f0a85d6a365f 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1544,6 +1544,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 @@ -1566,6 +1569,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