[I18n-sig] codecs module, readlines and xreadlines

Martin v. Löwis martin@v.loewis.de
17 Jan 2003 00:52:09 +0100


Guido van Rossum <guido@python.org> writes:

> That's exactly what Universal newlines does.  Have I missed something?

The issue is whether codecs.open should follow the platform
conventions for text mode if neither "b" nor "U" is passed. Builtin
open currently does, codecs.open does not (instead, it treats a plain
"r" just as if "rb" had been passed).

Furthermore, the *implementation* of universal newlines is useless for
codecs.open, as the newline conversion must happen after decoding, not
before.

Regards,
Martin