Skip to content

Commit 149f7f7

Browse files
Add typing.NamedTuple in glossary section for named tuples (#108327)
1 parent 3325699 commit 149f7f7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/glossary.rst

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

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

0 commit comments

Comments
 (0)