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 sjmachin
Recipients lregebro, r.david.murray, sjmachin, skip.montanaro, terry.reedy
Date 2011-01-23.05:46:49
SpamBayes Score 4.872826e-07
Marked as misclassified No
Message-id <1295761612.5.0.772503030463.issue10954@psf.upfronthosting.co.za>
In-reply-to
Content
I don't understand "Changing csv api is a feature request that could only happen in 3.3". This is NOT a request for an API change. Lennert's point is that an API change was made in 3.0 as compared with 2.6 but there is no fixer in 2to3. What is requested is for csv.reader/writer to give more meaningful error messages for valid 2.x code that has been put through fixer-less 2to3.

The name of the arg is "newline". "newlines" is an attribute that stores what was actually found in "universal newlines" mode.

newline='' is needed on input for the same reason that binary mode is required in 2.x: \r and \n may quite validly appear in data, inside a quoted field, and must not be treated as part of a row separator.

newline='' is needed on output for the same reason that binary mode is required in 2.x: any \n in the data and any \n in the caller's chosen "line" terminator must be preserved from being changed to os.linesep (e.g. \r\n).

"newline" is not available as an attribute of the _io.TextIOWrapper object created by open('xxx.csv', 'w', newline=''); is exposing this possible?
History
Date User Action Args
2011-01-23 05:46:52sjmachinsetrecipients: + sjmachin, skip.montanaro, terry.reedy, lregebro, r.david.murray
2011-01-23 05:46:52sjmachinsetmessageid: <1295761612.5.0.772503030463.issue10954@psf.upfronthosting.co.za>
2011-01-23 05:46:50sjmachinlinkissue10954 messages
2011-01-23 05:46:49sjmachincreate