bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010)
This commit is contained in:
parent
c6734ee7c5
commit
4210ad5ebd
|
@ -757,7 +757,7 @@ Glossary
|
||||||
Some named tuples are built-in types (such as the above examples).
|
Some named tuples are built-in types (such as the above examples).
|
||||||
Alternatively, a named tuple can be created from a regular class
|
Alternatively, a named tuple can be created from a regular class
|
||||||
definition that inherits from :class:`tuple` and that defines named
|
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
|
the factory function :func:`collections.namedtuple`. The latter
|
||||||
technique also adds some extra methods that may not be found in
|
technique also adds some extra methods that may not be found in
|
||||||
hand-written or built-in named tuples.
|
hand-written or built-in named tuples.
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
/* Implementation helper: a struct that looks like a tuple. See timemodule
|
/* Implementation helper: a struct that looks like a tuple.
|
||||||
and posixmodule for example uses. */
|
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 "Python.h"
|
||||||
#include "pycore_tupleobject.h"
|
#include "pycore_tupleobject.h"
|
||||||
|
|
Loading…
Reference in New Issue