[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: +30300 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32225 ___ Python tracker ___

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : Added file: https://bugs.python.org/file50711/sam_ezeh.patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : Removed file: https://bugs.python.org/file50710/sam_ezeh.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : Added file: https://bugs.python.org/file50710/sam_ezeh.patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : Removed file: https://bugs.python.org/file50709/sam_ezeh.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Sam Ezeh added the comment: I've submitted a patch that introduces code that raises TypeError at construction if `fieldnames` is not a sequence -- keywords: +patch nosy: +sam_ezeh Added file: https://bugs.python.org/file50709/sam_ezeh.patch ___

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-03-19 Thread Irit Katriel
Irit Katriel added the comment: Perhaps we could raise an exception with a clearer error message when fieldnames not a sequence? -- nosy: +iritkatriel versions: +Python 3.11 -Python 3.7 ___ Python tracker

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2018-01-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: This isn't a bug. The docs specify that *fieldnames* is a sequence, "The fieldnames parameter is a sequence of keys that identify the order in which values in the dictionary passed to the writerow() method are written to the

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2018-01-13 Thread Ben Cummings
New submission from Ben Cummings : If I pass an iterator to csv.DictWriter as the fieldname field, then DictWriter consumes that iterator pretty quickly, emitting strange errors such as the following when trying to write the headers. >>> import csv >>> fields =