]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-94439: typing docs: Add minimum version to `__required_keys__` and `__optio...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 13 Aug 2022 18:42:27 +0000 (11:42 -0700)
committerGitHub <noreply@github.com>
Sat, 13 Aug 2022 18:42:27 +0000 (19:42 +0100)
Co-authored-by: Howie Zhao <howiezhaohr@hotmail.com>
Doc/library/typing.rst

index ba73d69e87940371113de21d561d5fbafd037565..0951916f080a5863085c81e73f340bf7fb75cdf5 100644 (file)
@@ -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