]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Add `typing.NamedTuple` in glossary section for named tuples (GH-108327) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 12 Mar 2024 22:54:18 +0000 (23:54 +0100)
committerGitHub <noreply@github.com>
Tue, 12 Mar 2024 22:54:18 +0000 (22:54 +0000)
(cherry picked from commit 149f7f7ae28944579792d22607532006977177c9)

Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
Doc/glossary.rst

index f520df5de049b3402ca6103686399fcad2af36d5..3943bb6a13213dc8598f0e34f0477023da68b4a5 100644 (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