[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

Serhiy Storchaka report at bugs.python.org
Tue Jan 6 09:57:56 CET 2015


Serhiy Storchaka added the comment:

The docs mention that "row" should be a sequence, so there is no a bug.

Here is a patch which makes writerow() accept an iterable without converting it to a list. It also adds tests for few corner cases and fixes the docs.

----------
nosy: +serhiy.storchaka
stage: needs patch -> patch review
Added file: http://bugs.python.org/file37612/csv_writerow_iterable.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23171>
_______________________________________


More information about the Python-bugs-list mailing list