]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94439: typing docs: Add minimum version to `__required_keys__` and `__optional_key...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 13 Aug 2022 04:31:51 +0000 (21:31 -0700)
committerGitHub <noreply@github.com>
Sat, 13 Aug 2022 04:31:51 +0000 (21:31 -0700)
(cherry picked from commit f235178beccf5eb5b47e770240f32d9ba24b26fd)

Co-authored-by: Howie Zhao <howiezhaohr@hotmail.com>
Doc/library/typing.rst

index 1b7cf31d7cded1b013bbb4be2a1f9f7cf6b93ab8..f0a85d6a365fd07ebabb42c8d04a80e945ba49a0 100644 (file)
@@ -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