[Python-Dev] New lines, carriage returns, and Windows
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Sep 27 04:04:13 CEST 2007
Dino Viehland wrote:
> When writing a string in text mode that contains \r\n we both write \r\r\n
Maybe there should be a universal newlines mode defined for
output as well as input, which translates any of "\r", "\n"
or "\r\n" into the platform line ending.
Although I suspect that a string containing "\r\n" is going
to cause more problems for Python applications than this.
E.g. consider what happens when you try to split a string
on newlines.
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | Carpe post meridiem! |
Christchurch, New Zealand | (I'm not a morning person.) |
greg.ewing at canterbury.ac.nz +--------------------------------------+
More information about the Python-Dev
mailing list