On 12/08/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Note that Python does nothing special in the above case. For non-Windows > platforms, you'd get two different results -- the conversion from \r\n to > \n is done by the Windows C runtime since the default open() mode is text > mode. > > Only with mode 'U' does Python use its own universal newline mode.
Pah. You're right - I almost used 'U' and then "discovered" that I didn't need it (and got bitten by a portability bug as a result :-() > With Python 3.0, the C library is not used and Python uses universal newline > mode by default. That's what I expected, but I was surprised to find that the PEP is pretty unclear on this. The phrase "universal newlines" is mentioned only once, and never defined. Knowing the meaning, I can see how the PEP is intended to say that universal newlines on input is the default (and you set the newline argument to specify a *specific*, non-universal, newline value) - but I missed it on first reading. Thanks for the clarification. Paul. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com