Skip Montanaro <skip.montan...@gmail.com> added the comment:

Okay, I'll reopen this, at least for the discussion of QUOTE_NONNULL. 
@erdnaxeli please given an example of how PostgreSQL distinguishes between the 
empty string and None cases. Is it a quoted empty string vs an empty field? If 
so, modifying @samwyse's original example, is this what you are after?

>>> csv.register_dialect('quote_notnull', quoting=csv.QUOTE_NOTNULL)
>>> csv.writer(sys.stdout, dialect='quote_notnull').writerow(['', None, 42])
"",,"42"

? Can you modify the original two patches to restrict to QUOTE_NONNULL?

----------
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://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