[issue32919] csv.reader() to support QUOTE_ALL

Pavel Shpilev report at bugs.python.org
Thu Feb 22 23:55:23 EST 2018


New submission from Pavel Shpilev <p.shpilev at gmail.com>:

It appears that in current implementation csv.QUOTE_ALL has no effect on csv. reader(), it only affects csv.writer(). I know that csv is a poorly defined format and all, but I think this might be useful to distinguish None and '' values for the sources that use such quoting.

Example:

"1","Noneval",,"9"
"2","Emptystr","","10"
"3","somethingelse","","8"

Reader converts all values in the third column to empty strings. The suggestion is to adjust reader's behaviour so when quoting=csv.QUOTE_ALL that would instruct reader to convert empty values (like the one in the first row) to None instead.

----------
components: Extension Modules
messages: 312617
nosy: Pavel Shpilev
priority: normal
severity: normal
status: open
title: csv.reader() to support QUOTE_ALL
type: enhancement
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32919>
_______________________________________


More information about the Python-bugs-list mailing list