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 Martin.Budaj
Recipients Martin.Budaj
Date 2010-11-23.17:55:40
SpamBayes Score 6.39045e-08
Marked as misclassified No
Message-id <1290534942.45.0.466757650174.issue10515@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2010-11-23 17:55:42Martin.Budajsetrecipients: + Martin.Budaj
2010-11-23 17:55:42Martin.Budajsetmessageid: <1290534942.45.0.466757650174.issue10515@psf.upfronthosting.co.za>
2010-11-23 17:55:40Martin.Budajlinkissue10515 messages
2010-11-23 17:55:40Martin.Budajcreate