]> granicus.if.org Git - python/commit
Make the fieldnames argument optional in the DictReader. If self.fieldnames
authorSkip Montanaro <skip@pobox.com>
Fri, 3 Oct 2003 14:03:01 +0000 (14:03 +0000)
committerSkip Montanaro <skip@pobox.com>
Fri, 3 Oct 2003 14:03:01 +0000 (14:03 +0000)
commitdffeed3ffa745d79a4a44a03c31895f6a63a5a79
tree5050d559aaf33b03e6428654f25c8d1f1a74a9cc
parent3bbd6543a0c27fbeb1c1820d482dd6b89ebafaa7
Make the fieldnames argument optional in the DictReader.  If self.fieldnames
is None, the next row read is used as the fieldnames.  In the common case,
this means the programmer doesn't need to know the fieldnames ahead of time.
The first row of the file will be used.  In the uncommon case, this means
the programmer can set the reader's fieldnames attribute to None at any time
and have the next row read as the next set of fieldnames, so a csv file can
contain several "sections", each with different fieldnames.
Doc/lib/libcsv.tex
Lib/csv.py
Lib/test/test_csv.py