gh-94439: typing docs: Add minimum version to __required_keys__ and __optional_keys__ (GH-95373)

(cherry picked from commit f235178bec)

Co-authored-by: Howie Zhao <howiezhaohr@hotmail.com>
This commit is contained in:
Miss Islington (bot) 2022-08-12 21:31:51 -07:00 committed by GitHub
parent 83bde57f6e
commit a372a7d653
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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