summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-03-12 22:53:08 (GMT)
committerGitHub <noreply@github.com>2024-03-12 22:53:08 (GMT)
commit65c6620a3aa677ed1315f6ebec134aedf65664c2 (patch)
tree9b7343e0bc681e838af8f005b5718ab37d0e11a0 /Doc
parent817ccac17ccf0ac964e9c88d9d895a1c4ff7044f (diff)
downloadcpython-65c6620a3aa677ed1315f6ebec134aedf65664c2.zip
cpython-65c6620a3aa677ed1315f6ebec134aedf65664c2.tar.gz
cpython-65c6620a3aa677ed1315f6ebec134aedf65664c2.tar.bz2
[3.12] Add `typing.NamedTuple` in glossary section for named tuples (GH-108327) (#116689)
(cherry picked from commit 149f7f7ae28944579792d22607532006977177c9) Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/glossary.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index b475cb8..602006a 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -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