[issue3359] add 'rbU' mode to open()

anatoly techtonik report at bugs.python.org
Thu Jul 24 14:39:17 CEST 2008


anatoly techtonik <techtonik at gmail.com> added the comment:

Thanks for the hints. It appeared that "universal text mode" is not for
crossplatform but for platform-specific programming. =)

So I gave it up and ended with my own 'rb' newlines counter and 'wb'
writer which inserts lines in required format.

As for 2.6 io.open()
http://docs.python.org/dev/library/io.html#module-io
- can anybody point what's the difference between text mode with
newlines='' and binary mode?
- the comment about newline=<string>
"If it is '', universal newline mode is enabled, but line endings are
returned to the caller untranslated. If it has any of the other legal
values, input lines are only terminated by the given string, and the
line ending is returned to the caller untranslated."
does it mean that if newline='\r\n' is specified all single '\n'
characters are returned inline?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3359>
_______________________________________


More information about the Python-bugs-list mailing list