[issue23041] csv needs more quoting rules

Berker Peksag report at bugs.python.org
Thu Mar 3 02:09:55 EST 2016


Berker Peksag added the comment:

I was thinking adding a more flexible API like:

    ...
    spamwriter = csv.writer(csvfile, quoting_callable=lambda field: field is not None)
    ...

But that would require too much change in the csv module (or at least its implementation wouldn't be trivial).

I agree that subclassing DictWriter is a much better way to achieve this.

----------
stage: patch review -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list