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 peter.otten
Recipients Mariatta, keef604, peter.otten, r.david.murray, rhettinger
Date 2017-04-11.07:39:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491896346.31.0.132533972885.issue30034@psf.upfronthosting.co.za>
In-reply-to
Content
While I don't think that the csv module should second-guess broken input you might consider "fixing" your data on the fly:

def close_quote(line):
    if line.count('"') % 2:
        line = line.rstrip("\n") + '"\n'
    return line

with open("data.csv") as f:
    for row in csv.reader(map(close_quote, f)):
        print(row)

That should give the desired output.
History
Date User Action Args
2017-04-11 07:39:06peter.ottensetrecipients: + peter.otten, rhettinger, r.david.murray, Mariatta, keef604
2017-04-11 07:39:06peter.ottensetmessageid: <1491896346.31.0.132533972885.issue30034@psf.upfronthosting.co.za>
2017-04-11 07:39:06peter.ottenlinkissue30034 messages
2017-04-11 07:39:06peter.ottencreate