[issue1395] py3k: duplicated line endings when using read(1)

Guido van Rossum report at bugs.python.org
Tue Nov 6 19:59:14 CET 2007


Guido van Rossum added the comment:

> In my opinion the check for \r should only happen when os.linesep or
> newline starts with \r. On Unix with standard newline the \r should be
> treated as every other char.

No: it is not dependent on os.linesep but on the newline parameter
passed to open().
It's perfectly valid to want to read a file with CRLF endings on Unix
(Amaury's patches end up in my /tmp directory like that.)

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1395>
__________________________________


More information about the Python-bugs-list mailing list