diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-08-12 21:31:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-12 21:31:51 -0700 |
commit | a372a7d65320396d44e8beb976e3a6c382963d4e (patch) | |
tree | 060a64b524118ddaae69ebd0d69f803222a14082 | |
parent | 83bde57f6e549b017116d2c89ef427ea0fb8dad4 (diff) | |
download | cpython-git-a372a7d65320396d44e8beb976e3a6c382963d4e.tar.gz |
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 <howiezhaohr@hotmail.com>
-rw-r--r-- | Doc/library/typing.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 1b7cf31d7c..f0a85d6a36 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 |