Skip to content

Commit d04c85f

Browse files
bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16062)
(cherry picked from commit 4210ad5) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
1 parent 98a4a71 commit d04c85f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ Glossary
757757
Some named tuples are built-in types (such as the above examples).
758758
Alternatively, a named tuple can be created from a regular class
759759
definition that inherits from :class:`tuple` and that defines named
760-
fields. Such as class can be written by hand or it can be created with
760+
fields. Such a class can be written by hand or it can be created with
761761
the factory function :func:`collections.namedtuple`. The latter
762762
technique also adds some extra methods that may not be found in
763763
hand-written or built-in named tuples.

Objects/structseq.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
/* Implementation helper: a struct that looks like a tuple. See timemodule
2-
and posixmodule for example uses. */
1+
/* Implementation helper: a struct that looks like a tuple.
2+
See timemodule and posixmodule for example uses.
3+
4+
The structseq helper is considered an internal CPython implementation
5+
detail. Docs for modules using structseqs should call them
6+
"named tuples" (be sure to include a space between the two
7+
words and add a link back to the term in Docs/glossary.rst).
8+
*/
39

410
#include "Python.h"
511
#include "pycore_tupleobject.h"

0 commit comments

Comments
 (0)