]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-143728: Keep `TypedDict` and `NamedTuple` in `class` role in docs (GH-14370...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 13 Jan 2026 13:58:10 +0000 (14:58 +0100)
committerGitHub <noreply@github.com>
Tue, 13 Jan 2026 13:58:10 +0000 (13:58 +0000)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Doc/library/typing.rst

index c5e8af0b5a4a7378a4dcb40daf6e144e16b5ffc4..886b230d1718d783ef139ee87653697f6c3bf89f 100644 (file)
@@ -2355,7 +2355,7 @@ These functions and classes should not be used directly as annotations.
 Their intended purpose is to be building blocks for creating and declaring
 types.
 
-.. function:: NamedTuple
+.. class:: NamedTuple
 
    Typed version of :func:`collections.namedtuple`.
 
@@ -2588,7 +2588,7 @@ types.
       for more details.
 
 
-.. function:: TypedDict
+.. class:: TypedDict(dict)
 
    Special construct to add type hints to a dictionary.
    At runtime ":class:`!TypedDict` instances" are simply :class:`dicts <dict>`.