File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2369,7 +2369,7 @@ These functions and classes should not be used directly as annotations.
23692369Their intended purpose is to be building blocks for creating and declaring
23702370types.
23712371
2372- .. class :: NamedTuple
2372+ .. function :: NamedTuple
23732373
23742374 Typed version of :func: `collections.namedtuple `.
23752375
@@ -2442,6 +2442,9 @@ types.
24422442 Removed the ``_field_types `` attribute in favor of the more
24432443 standard ``__annotations__ `` attribute which has the same information.
24442444
2445+ .. versionchanged :: 3.9
2446+ ``NamedTuple `` is now a function rather than a class.
2447+
24452448 .. versionchanged :: 3.11
24462449 Added support for generic namedtuples.
24472450
@@ -2585,7 +2588,7 @@ types.
25852588 for more details.
25862589
25872590
2588- .. class :: TypedDict(dict)
2591+ .. function :: TypedDict
25892592
25902593 Special construct to add type hints to a dictionary.
25912594 At runtime it is a plain :class: `dict `.
@@ -2811,6 +2814,9 @@ types.
28112814
28122815 .. versionadded :: 3.8
28132816
2817+ .. versionchanged :: 3.9
2818+ ``TypedDict `` is now a function rather than a class.
2819+
28142820 .. versionchanged :: 3.11
28152821 Added support for marking individual keys as :data: `Required ` or :data: `NotRequired `.
28162822 See :pep: `655 `.
You can’t perform that action at this time.
0 commit comments