Message236328
The documentation for the csv.writer.writerows method says that it expects "a list of row objects", when it really will accept any iterable that yields rows (such as a generator). While it's often nice for code to be more accepting than the documented requirements, I think the docs in this case should state that writerows() expects an iterable, rather than misinforming users that a list is required.
This documentation issue was brought up in a Stack Overflow question here: http://stackoverflow.com/questions/28636848/csv-writer-writerows-takes-iterator
I expect the necessary documentation patch will be pretty trivial, and if nobody else gets to it first, I will try to provide one when I have enough time to update my cpython checkout (not soon, alas). |
|
Date |
User |
Action |
Args |
2015-02-20 20:45:53 | Steven.Barker | set | recipients:
+ Steven.Barker, docs@python |
2015-02-20 20:45:53 | Steven.Barker | set | messageid: <1424465153.78.0.58816335685.issue23495@psf.upfronthosting.co.za> |
2015-02-20 20:45:53 | Steven.Barker | link | issue23495 messages |
2015-02-20 20:45:53 | Steven.Barker | create | |
|