8000 docs: clarify DictReader's treatment of the first data row. by nedbat · Pull Request #118549 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

docs: clarify DictReader's treatment of the first data row. #118549

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

Merged
merged 2 commits into from
May 3, 2024

Conversation

nedbat
Copy link
Member
@nedbat nedbat commented May 3, 2024

A clarification based on a discussion in the Python discord.


📚 Documentation preview 📚: https://cpython-previews--118549.org.readthedocs.build/

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels May 3, 2024
@@ -156,8 +156,10 @@ The :mod:`csv` module defines the following classes:

The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is
omitted, the values in the first row of file *f* will be used as the
fieldnames. Regardless of how the fieldnames are determined, the
dictionary preserves their original ordering.
fieldnames and the first row will not produce a dict in the result. If
Copy link
@rfdzan rfdzan May 3, 2024

Choose a reason for hiding this comment

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

Since the first row will be used as the fieldnames and be omitted, how about writing this line as simply:

"...fieldnames and therefore be omitted. If..."

@JelleZijlstra JelleZijlstra added the needs backport to 3.12 only security fixes label May 3, 2024
@JelleZijlstra JelleZijlstra merged commit 9d67b72 into python:main May 3, 2024
29 checks passed
@miss-islington-app
Copy link

Thanks @nedbat for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 3, 2024
…nGH-118549)

(cherry picked from commit 9d67b72)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
@bedevere-app
Copy link
bedevere-app bot commented May 3, 2024

GH-118555 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label May 3, 2024
JelleZijlstra pushed a commit that referenced this pull request May 3, 2024
…GH-118549) (#118555)


(cherry picked from commit 9d67b72)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
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 issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0