New submission from Pavel Shpilev <p.shpi...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue32919>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to