[issue30046] csv: Inconsistency re QUOTE_NONNUMERIC

Xiang Zhang report at bugs.python.org
Thu Apr 13 03:27:02 EDT 2017


Xiang Zhang added the comment:

boolean is not quoted since in Python it's a subclass of int so True and False are numeric. This is also the case with numeric objects defining __int__ or __float__ but doesn't get a corresponding string representation.

Since QUOTE_NONNUMERIC will converts data to float when reading, I think we may force the converting even when writing so the inconsistency would disappear. Or document this limitation.

----------
nosy: +xiang.zhang

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


More information about the Python-bugs-list mailing list