This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients berker.peksag, krypten, r.david.murray, rhettinger, samwyse, skip.montanaro
Date 2016-03-02.23:06:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456959974.39.0.26101715028.issue23041@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the update berker.peksag. I'm still not convinced that the csv module should be modified just so one user (sorry samwyse) can match the input format of someone's Java program. It seems a bit like trying to make the csv module type-sensitive. What happens when someone finds a csv file containing timestamps in a format other than the datetime.datetime object will produce by default? Why is None special as an object where bool(obj) is False?

I think the better course here is to either:

* subclass csv.DictWriter, use dictionaries as your element type, and have its writerow method do the application-specific work.

* define a writerow() function which does something similar (essentially wrapping csv.writerow()).

If someone else thinks this is something which belongs in Python's csv module, feel free to reopen and assign it to yourself.
History
Date User Action Args
2016-03-02 23:06:14skip.montanarosetrecipients: + skip.montanaro, rhettinger, samwyse, r.david.murray, berker.peksag, krypten
2016-03-02 23:06:14skip.montanarosetmessageid: <1456959974.39.0.26101715028.issue23041@psf.upfronthosting.co.za>
2016-03-02 23:06:14skip.montanarolinkissue23041 messages
2016-03-02 23:06:14skip.montanarocreate