New submission from Martin Budaj <m.bu...@gmail.com>: The method Sniffer._guess_quote_and_delimiter() in the module csv.py contains a bug in a regexp which checks for quotes around the last item of the line (example: a,b,"c,d"\n).
the pattern '(?P<delim>>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?:$|\n)' used in the regex should be changed to '(?P<delim>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?:$|\n)' file csv.py: line 212 in python 2.6, line 216 in 2.7, line 207 in 3.1 ---------- components: Library (Lib) messages: 122227 nosy: Martin.Budaj priority: normal severity: normal status: open title: csv sniffer does not recognize quotes at the end of line type: behavior versions: Python 2.6, Python 2.7, Python 3.1 _______________________________________ 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