Author sfinnie
Recipients georg.brandl, sfinnie
Date 2010-04-13.21:11:21
SpamBayes Score 9.04038e-08
Marked as misclassified No
Message-id <>
Running the examples in the csv module docs ( causes problems reading file on a mac.  This is highlighted in issue 1072404 (

Commentary on the bug indicates a no fix, meaning most/many people using a mac will get an error if they use the sample code in the docs.

A simpler solution would be to use universal newline mode in the doc examples.  This is actually mentioned in commentary on the bug, and appears to work.

In all example code blocks, use mode 'rU' when opening the file.  1st code block, for example, would become:

spamReader = csv.reader(open('eggs.csv', 'rU'), delimiter=' ', quotechar='|')

That should solve the problem on mac without impacting compatibility on other operating systems.  Note: Haven't been able to verify this on other platforms.
Date User Action Args
2010-04-13 21:11:26sfinniesetrecipients: + sfinnie, georg.brandl
2010-04-13 21:11:26sfinniesetmessageid: <>
2010-04-13 21:11:22sfinnielinkissue8387 messages
2010-04-13 21:11:21sfinniecreate