]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add `typing.NamedTuple` in glossary section for named tuples (#108327)
authorTushar Sadhwani <tushar.sadhwani000@gmail.com>
Tue, 12 Mar 2024 22:46:42 +0000 (04:16 +0530)
committerGitHub <noreply@github.com>
Tue, 12 Mar 2024 22:46:42 +0000 (15:46 -0700)
Doc/glossary.rst

index f656e32514c71781e19adb3ce2d47713d3370d02..72fb09ef6207c9c65ea0fc786ccd0bab86e23ba8 100644 (file)
@@ -841,10 +841,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