Skip Montanaro <s...@pobox.com> added the comment:

>From the comment in the test_csv.py:

+        # XXX: I don't know what the correct behavior should be for these.
+        # Currently the first one raises an error that the delimiter can't
+        # be determined while the second one returns '\r'.  The second
+        # is obviously.
+        ('"a,b,c,d"\ne',  ''),
+        ('"a,b,c,d"\r\ne', ''),

Obviously what?  My guess would be "wrong".  In the absence of any other
information \r\n has to be treated as a line separator.  It shouldn't be
considered as two separate characters, even in such a devoid-of-clues test
case.

Is the empty string a valid delimiter?  I've never tried it and it's been a
long time since I looked at any of the code.  I do use single-column CSV
files from time-to-time though.  I don't think a ',' would be a completely
unreasonable fallback scenario either.

Skip

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to