bpo-38096: Clean up the "struct sequence" / "named tuple" docs - #15895
Conversation
|
Thanks @rhettinger for the PR, and @pganssle for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
|
Sorry, @rhettinger and @pganssle, I could not cleanly backport this to |
|
Sorry @rhettinger and @pganssle, I had trouble checking out the |
…nGH-15895) * bpo-38096: Clean up the "struct sequence" / "named tuple" docs * Fix remaining occurrences of "struct sequence" * Repair a user visible docstring (cherry picked from commit 7117074)
|
GH-15961 is a backport of this pull request to the 3.8 branch. |
|
GH-15962 is a backport of this pull request to the 3.7 branch. |
tim-one
left a comment
There was a problem hiding this comment.
Looks great! Thank you. Some comments:
-
Left a comment pointing out a typo.
-
Would have liked to see a blurb added to
structseq.cpointing out that structseq is an internal CPython implementation detail, and that docs for modules using structseqs should call them "named tuples".
| 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 |
There was a problem hiding this comment.
Typo: "as" in "Such as class" should be "a".
…nGH-15895) * bpo-38096: Clean up the "struct sequence" / "named tuple" docs * Fix remaining occurrences of "struct sequence" * Repair a user visible docstring
https://bugs.python.org/issue38096