This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vajrasky
Recipients r.david.murray, serhiy.storchaka, vajrasky
Date 2013-12-20.04:38:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
In-reply-to
Content
Python 3.4.0b1 (default:13a505260f17, Dec 20 2013, 12:02:44) 
[GCC 4.7.2] on linux
>>> import _csv
>>> import csv
>>> _csv.Dialect(quotechar=b'+')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: "quotechar" must be string, not bytes

Hey, that's not true. Quotechar can be None.

>>> _csv.Dialect(quotechar=None)
<_csv.Dialect object at 0x7f64a8534790>

>>> _csv.Dialect(quotechar="cutecat")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: "quotechar" must be an 1-character string

That's not strictly true. Quotechar can be 0-character string in certain situation.

>>> _csv.Dialect(quotechar="", quoting=csv.QUOTE_NONE)
<_csv.Dialect object at 0x7f64a85345f0>

Python 2.7 suffers the same issue.
History
Date User Action Args
2013-12-20 04:38:14vajraskysetrecipients: + vajrasky, r.david.murray, serhiy.storchaka
2013-12-20 04:38:14vajraskysetmessageid: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
2013-12-20 04:38:14vajraskylinkissue20028 messages
2013-12-20 04:38:13vajraskycreate