Skip to content

Commit baba8d2

Browse files
[3.14] gh-143728: Keep TypedDict and NamedTuple in class role in docs (GH-143702) (#143799)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
1 parent 4a191f9 commit baba8d2

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
@@ -2355,7 +2355,7 @@ These functions and classes should not be used directly as annotations.
23552355
Their intended purpose is to be building blocks for creating and declaring
23562356
types.
23572357

2358-
.. function:: NamedTuple
2358+
.. class:: NamedTuple
23592359

23602360
Typed version of :func:`collections.namedtuple`.
23612361

@@ -2588,7 +2588,7 @@ types.
25882588
for more details.
25892589

25902590

2591-
.. function:: TypedDict
2591+
.. class:: TypedDict(dict)
25922592

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

0 commit comments

Comments
 (0)