Skip to content

Commit 3dd9afc

Browse files
[3.13] gh-143728: Keep TypedDict and NamedTuple in class role in docs (GH-143702) (#143800)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
1 parent be602fc commit 3dd9afc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/typing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,7 @@ These functions and classes should not be used directly as annotations.
22572257
Their intended purpose is to be building blocks for creating and declaring
22582258
types.
22592259

2260-
.. function:: NamedTuple
2260+
.. class:: NamedTuple
22612261

22622262
Typed version of :func:`collections.namedtuple`.
22632263

@@ -2486,7 +2486,7 @@ types.
24862486
for more details.
24872487

24882488

2489-
.. function:: TypedDict
2489+
.. class:: TypedDict(dict)
24902490

24912491
Special construct to add type hints to a dictionary.
24922492
At runtime ":class:`!TypedDict` instances" are simply :class:`dicts <dict>`.

0 commit comments

Comments
 (0)