[Python-checkins] bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16063)

Raymond Hettinger webhook-mailer at python.org
Thu Sep 12 11:20:11 EDT 2019


https://github.com/python/cpython/commit/e3c25fc902eedcd5c593fac58f35645961f55bf4
commit: e3c25fc902eedcd5c593fac58f35645961f55bf4
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Raymond Hettinger <rhettinger at users.noreply.github.com>
date: 2019-09-12T08:20:07-07:00
summary:

bpo-38096:  Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16063)

(cherry picked from commit 4210ad5ebd5769f585035e022876e161cd0e9a3e)

Co-authored-by: Raymond Hettinger <rhettinger at users.noreply.github.com>

files:
M Doc/glossary.rst
M Objects/structseq.c

diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 3aa54b9eff9e..8af4373b11d7 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -753,7 +753,7 @@ 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 as class can be written by hand or it can be created with
+      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.
diff --git a/Objects/structseq.c b/Objects/structseq.c
index e48165dcd008..c71898fd79c0 100644
--- a/Objects/structseq.c
+++ b/Objects/structseq.c
@@ -1,5 +1,11 @@
-/* Implementation helper: a struct that looks like a tuple.  See timemodule
-   and posixmodule for example uses. */
+/* Implementation helper: a struct that looks like a tuple.
+   See timemodule and posixmodule for example uses.
+
+   The structseq helper is considered an internal CPython implementation
+   detail.  Docs for modules using structseqs should call them
+   "named tuples" (be sure to include a space between the two
+   words and add a link back to the term in Docs/glossary.rst).
+*/
 
 #include "Python.h"
 #include "structmember.h"



More information about the Python-checkins mailing list