Skip to content

Commit 65c6620

Browse files
[3.12] Add typing.NamedTuple in glossary section for named tuples (GH-108327) (#116689)
(cherry picked from commit 149f7f7) Co-authored-by: Tushar Sadhwani <[email protected]>
1 parent 817ccac commit 65c6620

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/glossary.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,10 +840,11 @@ Glossary
840840
Some named tuples are built-in types (such as the above examples).
841841
Alternatively, a named tuple can be created from a regular class
842842
definition that inherits from :class:`tuple` and that defines named
843-
fields. Such a class can be written by hand or it can be created with
844-
the factory function :func:`collections.namedtuple`. The latter
845-
technique also adds some extra methods that may not be found in
846-
hand-written or built-in named tuples.
843+
fields. Such a class can be written by hand, or it can be created by
844+
inheriting :class:`typing.NamedTuple`, or with the factory function
845+
:func:`collections.namedtuple`. The latter techniques also add some
846+
extra methods that may not be found in hand-written or built-in named
847+
tuples.
847848

848849
namespace
849850
The place where a variable is stored. Namespaces are implemented as

0 commit comments

Comments
 (0)