Skip to content

Commit 6e7ccef

Browse files
garethtgvanrossum
authored andcommitted
Clarify documentation about TypedDicts. (#4156)
This notes that TypedDicts are now officially supported and clarifies what is required to use the inheritance syntax for TypedDicts.
1 parent 5e37c21 commit 6e7ccef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/source/kinds_of_types.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,8 @@ TypedDict
11661166

11671167
.. note::
11681168

1169-
TypedDict is not yet an officially supported feature. It may not work reliably,
1170-
and details of TypedDict may change in future mypy releases.
1169+
TypedDict is an officially supported feature, but it is still experimental.
1170+
11711171

11721172
Python programs often use dictionaries with string keys to represent objects.
11731173
Here is a typical example:
@@ -1307,7 +1307,9 @@ Class-based syntax
13071307
------------------
13081308

13091309
Python 3.6 supports an alternative, class-based syntax to define a
1310-
TypedDict:
1310+
TypedDict. This means that your code must be checked as if it were
1311+
Python 3.6 (using the ``--python-version`` flag on the command line,
1312+
for example). Simply running mypy on Python 3.6 is insufficient.
13111313

13121314
.. code-block:: python
13131315

0 commit comments

Comments
 (0)