-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-38096: Clean up the "struct sequence" / "named tuple" docs #15895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you. Some comments:
-
Left a comment pointing out a typo.
-
Would have liked to see a blurb added to
structseq.c
pointing 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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