John Machin <sjmac...@lexicon.net> added the comment:

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?

----------
versions: +Python 3.2 -Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10954>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to