[issue10515] csv sniffer does not recognize quotes at the end of line

R. David Murray report at bugs.python.org
Sat Dec 11 04:46:54 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

What do you mean by "there is a test for this case in csv.py"?  If I run sniffer against "abcde\ndefgh\n" I get a delimiter of 'e'.  If I run it against 'a\nb\n', I get the could not determine delimiter error.

Attached is a reformulated test case that lets us see the errors individually and easily add more.  With this set of 10 tests, two pass without your patches (as you knew; those are your tests), and we have 4 failures and 4 errors.  With p1 applied we have 4 failures and 3 errors.  With p2 applied we have 5 failures.

As I said, I'm not at all sure what the results *should* be for various of these cases.  Certainly the long standing existing behavior seems to be to return one of the characters in an unquoted multicharacter sequence. 

That said, it seems like your patch p1 is good, but as you discovered not sufficient.

----------

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


More information about the Python-bugs-list mailing list