summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-08-13 18:42:27 (GMT)
committerGitHub <noreply@github.com>2022-08-13 18:42:27 (GMT)
commit1fccb1d49334804f19cc809c968afee2aabb9b3a (patch)
tree4467b89f575c9a9f233a8d3c2e195628005f5c20 /Doc
parent63690996e8e8435b7cb9f77db82761316eefef85 (diff)
downloadcpython-1fccb1d49334804f19cc809c968afee2aabb9b3a.zip
cpython-1fccb1d49334804f19cc809c968afee2aabb9b3a.tar.gz
cpython-1fccb1d49334804f19cc809c968afee2aabb9b3a.tar.bz2
[3.11] gh-94439: typing docs: Add minimum version to `__required_keys__` and `__optional_keys__` (GH-95373) (#95944)
Co-authored-by: Howie Zhao <howiezhaohr@hotmail.com>
Diffstat (limited to 'Doc')
-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 ba73d69..0951916 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