From: Tushar Sadhwani Date: Tue, 12 Mar 2024 22:46:42 +0000 (+0530) Subject: Add `typing.NamedTuple` in glossary section for named tuples (#108327) X-Git-Tag: v3.13.0a6~359^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=149f7f7ae28944579792d22607532006977177c9;p=thirdparty%2FPython%2Fcpython.git Add `typing.NamedTuple` in glossary section for named tuples (#108327) --- diff --git a/Doc/glossary.rst b/Doc/glossary.rst index f656e32514c7..72fb09ef6207 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -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