Author tlotze
Recipients tlotze
Date 2017-04-11.20:41:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
A csv.writer with quoting=csv.QUOTE_NONNUMERIC does not quote boolean values, which makes a csv.reader with the same quoting behaviour fail on that value:

-------- ----------

import csv
import io

f = io.StringIO()

writer = csv.writer(f, quoting=csv.QUOTE_NONNUMERIC)
writer.writerow(['asdf', 1, True])
reader = csv.reader(f, quoting=csv.QUOTE_NONNUMERIC)
for row in reader:


$ python3 
Traceback (most recent call last):
  File "", line 12, in <module>
    for row in reader:
ValueError: could not convert string to float: 'True'


I'd consider this inconsistency a bug, but in any case something that needs documenting.
Date User Action Args
2017-04-11 20:41:55tlotzesetrecipients: + tlotze
2017-04-11 20:41:55tlotzesetmessageid: <>
2017-04-11 20:41:55tlotzelinkissue30046 messages
2017-04-11 20:41:55tlotzecreate