8000 [3.12] docs: clarify csv.DictReader's treatment of the first data row… · python/cpython@4a18a9b · GitHub
[go: up one dir, main page]

Skip to content

Commit 4a18a9b

Browse files
[3.12] docs: clarify csv.DictReader's treatment of the first data row (GH-118549) (#118555)
(cherry picked from commit 9d67b72) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
1 parent 3706eef commit 4a18a9b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/csv.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ The :mod:`csv` module defines the following classes:
156156

157157
The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is
158158
omitted, the values in the first row of file *f* will be used as the
159-
fieldnames. Regardless of how the fieldnames are determined, the
160-
dictionary preserves their original ordering.
159+
fieldnames and will be omitted from the results. If
160+
*fieldnames* is provided, they will be used and the first row will be
161+
included in the results. Regardless of how the fieldnames are determined,
162+
the dictionary preserves their original ordering.
161163

162164
If a row has more fields than fieldnames, the remaining data is put in a
163165
list and stored with the fieldname specified by *restkey* (which defaults

0 commit comments

Comments
 (0)
0