[Python-Dev] Next version of PEP278 - universal newline support - available

Guido van Rossum guido@python.org
2002年3月14日 13:33:45 -0500


> The PEP seems to assume that the changed behaviour only apply to
> .readline() and friends. I'm sure that is obvious to you, but for
> historical reasons beyound my control, the universal newline support in
> jython normalize all lineendings to a newline for all reads on text
> files. I think jython is wrong here and your PEP is better.

I hadn't noticed this. I'm not so sure. I would like to be able to
write
 f = open(filename, 'U')
 data = f.read()
and then use some regular expression or whatever to munge the text.
It would be nice if I would still get universal newline support in
this case.
--Guido van Rossum (home page: http://www.python.org/~guido/)

AltStyle によって変換されたページ (->オリジナル) /