Skip to content

Commit

Permalink
gh-94439: typing docs: Add minimum version to __required_keys__ and…
Browse files Browse the repository at this point in the history
… `__optional_keys__` (#95373)
  • Loading branch information
howiezhao authored Aug 13, 2022
1 parent 8281cbd commit f235178
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f235178

Please sign in to comment.