[issue18829] csv produces confusing error message when passed a non-string delimiter
Vajrasky Kok
report at bugs.python.org
Mon Aug 26 17:26:48 CEST 2013
Vajrasky Kok added the comment:
Apparently, other attributes of the csv dialect beside delimiter, such as escapechar and quotechar share the same problem.
>>> import _csv
>>> _csv.reader('foo', quotechar=b'"')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: quotechar must be set if quoting enabled
>>> _csv.reader('foo', escapechar=b'+')
<_csv.reader object at 0x7fa85d7847d0>Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: bad argument type for built-in operation
My patch already fixed the problem, only lacked the unit test. But since this ticket is about delimiter, I'll create the unit test for quotechar and escapechar in separate ticket after this ticket has been closed.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18829>
_______________________________________
More information about the Python-bugs-list
mailing list