Message396641
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? |
|
Date |
User |
Action |
Args |
2021-06-28 15:57:52 | skip.montanaro | set | recipients:
+ skip.montanaro, rhettinger, samwyse, r.david.murray, berker.peksag, serhiy.storchaka, krypten, yoonghm, tegdev, erdnaxeli |
2021-06-28 15:57:52 | skip.montanaro | set | messageid: <1624895872.17.0.630910228859.issue23041@roundup.psfhosted.org> |
2021-06-28 15:57:52 | skip.montanaro | link | issue23041 messages |
2021-06-28 15:57:52 | skip.montanaro | create | |
|