[Python-Dev] file read-ahead with Mac end-of-line
Skip Montanaro
skip at pobox.com
Mon Aug 18 09:16:21 EDT 2003
Guido> I'm not familiar with the csv module, but if it opens the file in
Guido> binary mode, readline() and next() are *required* to only honor
Guido> \n as the line end character. Maybe the csv module ought to open
Guido> the file in universal newline mode (f = open(filename, "U")?
That makes sense. I think the csv module will have to do its own
end-of-line detection, since the end-of-line terminator is explicit.
Guido> The patch you give would make next() behave like universal
Guido> newline mode in all modes, which is definitely wrong.
Good thing I asked. ;-)
Skip
More information about the Python-Dev
mailing list