Skip Montanaro added the comment:

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.

----------
resolution:  -> rejected

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23041>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to