summaryrefslogtreecommitdiffstats
path: root/Doc/library/typing.rst
diff options
context:
space:
mode:
authorHowie Zhao <howiezhaohr@hotmail.com>2022-08-13 04:23:33 (GMT)
committerGitHub <noreply@github.com>2022-08-13 04:23:33 (GMT)
commitf235178beccf5eb5b47e770240f32d9ba24b26fd (patch)
treef1bf69f92eec54a7fcdc97ee925f860576dad022 /Doc/library/typing.rst
parent8281cbddc6f0fbc94f0c21cacfac79a2d4057a4b (diff)
downloadcpython-f235178beccf5eb5b47e770240f32d9ba24b26fd.zip
cpython-f235178beccf5eb5b47e770240f32d9ba24b26fd.tar.gz
cpython-f235178beccf5eb5b47e770240f32d9ba24b26fd.tar.bz2
gh-94439: typing docs: Add minimum version to `__required_keys__` and `__optional_keys__` (#95373)
Diffstat (limited to 'Doc/library/typing.rst')
-rw-r--r--Doc/library/typing.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 4d422f5..c6dd697 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -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