[3.12] Add typing.NamedTuple in glossary section for named tuples (GH-108327) (#116689)

(cherry picked from commit 149f7f7ae2)

Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-03-12 23:53:08 +01:00 committed by GitHub
parent 817ccac17c
commit 65c6620a3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -840,10 +840,11 @@ Glossary
Some named tuples are built-in types (such as the above examples).
Alternatively, a named tuple can be created from a regular class
definition that inherits from :class:`tuple` and that defines named
fields. Such a class can be written by hand or it can be created with
the factory function :func:`collections.namedtuple`. The latter
technique also adds some extra methods that may not be found in
hand-written or built-in named tuples.
fields. Such a class can be written by hand, or it can be created by
inheriting :class:`typing.NamedTuple`, or with the factory function
:func:`collections.namedtuple`. The latter techniques also add some
extra methods that may not be found in hand-written or built-in named
tuples.
namespace
The place where a variable is stored. Namespaces are implemented as