Skip to content

Commit 865eb12

Browse files
authored
gh-143728: Keep TypedDict and NamedTuple in class role in docs (#143702)
1 parent 80e9eaf commit 865eb12

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

2372-
.. function:: NamedTuple
2372+
.. class:: NamedTuple
23732373

23742374
Typed version of :func:`collections.namedtuple`.
23752375

@@ -2589,7 +2589,7 @@ types.
25892589
for more details.
25902590

25912591

2592-
.. function:: TypedDict
2592+
.. class:: TypedDict(dict)
25932593

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

0 commit comments

Comments
 (0)