Skip to content

Commit

Permalink
Add another limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Sep 18, 2023
1 parent afd8037 commit 39c49f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2446,6 +2446,14 @@ types.

.. versionadded:: 3.9

.. note::

If ``from __future__ import annotations`` is used or if annotations
are given as strings, annotations are not evaluated when the
``TypedDict`` is defined. Therefore, the runtime introspection that
``__required_keys__`` and ``__optional_keys__`` rely on may not work
properly, and the values of the attributes may be incorrect.

See :pep:`589` for more examples and detailed rules of using ``TypedDict``.

.. versionadded:: 3.8
Expand Down

0 comments on commit 39c49f7

Please sign in to comment.