Skip to content

bpo-38096: Clean up the "struct sequence" / "named tuple" docs - #15895

Merged
pganssle merged 3 commits into
python:masterfrom
rhettinger:named_tuple_concept
Sep 11, 2019
Merged

bpo-38096: Clean up the "struct sequence" / "named tuple" docs#15895
pganssle merged 3 commits into
python:masterfrom
rhettinger:named_tuple_concept

Conversation

@rhettinger

@rhettinger rhettinger commented Sep 11, 2019

Copy link
Copy Markdown
Contributor

@pganssle pganssle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@pganssle
pganssle merged commit 7117074 into python:master Sep 11, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @rhettinger for the PR, and @pganssle for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @rhettinger and @pganssle, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7117074410118086938044c7a4ef6846ec1662b2 3.8

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry @rhettinger and @pganssle, I had trouble checking out the 3.7 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 7117074410118086938044c7a4ef6846ec1662b2 3.7

pganssle pushed a commit to pganssle/cpython that referenced this pull request Sep 11, 2019
…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)
@bedevere-bot

Copy link
Copy Markdown

GH-15961 is a backport of this pull request to the 3.8 branch.

@bedevere-bot

Copy link
Copy Markdown

GH-15962 is a backport of this pull request to the 3.7 branch.

@tim-one tim-one left a comment

Copy link
Copy Markdown
Member

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".

Comment thread Doc/glossary.rst
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

Copy link
Copy Markdown
Member

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".

DinoV pushed a commit to DinoV/cpython that referenced this pull request Sep 12, 2019
…nGH-15895)

* bpo-38096: Clean up the "struct sequence" / "named tuple" docs

* Fix remaining occurrences of "struct sequence"

* Repair a user visible docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants