On 8/15/07, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Adam Olsen wrote:
> > On 8/14/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>  >
> > > (2) newline='': input with untranslated universal newlines mode; lines
> > > may end in \r, \n, or \r\n, and these are returned untranslated.
> >
> > Caveat: this mode cannot be supported by sockets.  When reading a lone
> > \r you need to peek ahead to ensure the next character is not a \n,
> > but for sockets that may block indefinitely.
>
> You could return as soon as you see the '\r', with
> a flag set indicating that if the next character
> that comes in is '\n' it should be ignored.

That would be the *other* universal newlines mode. ;)

(Once you're already modifying the output, you might as well convert
everything to '\n'.)

-- 
Adam Olsen, aka Rhamphoryncus
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to