From baba8d2c7891b856697ddeace97f6075ca7fe759 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 13 Jan 2026 14:58:10 +0100 Subject: [PATCH] [3.14] gh-143728: Keep `TypedDict` and `NamedTuple` in `class` role in docs (GH-143702) (#143799) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartosz Sławecki --- Doc/library/typing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index c5e8af0b5a4a..886b230d1718 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -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 `. -- 2.47.3