[Python-Dev] PEP 278 - finished?
Guido van Rossum
Thu, 11 Apr 2002 15:34:55 -0400
> > A partial output implementation, where strings passed to fp.write()
> > would be converted to use fp.newlines as their line terminated but
> > all other output would not is far too surprising, in my view.
> > Because there is no output support for universal newlines there is
> > also no support for a mode "rU+": the surprise factor of the
> > previous paragraph would hold to an even stronger degree.
> I've read that, but I don't agree with the second paragraph. Universal
> newline support is available only for input. This sentence is enough to
> easily predict the behavior in every usage case, including "+" modes.
> If there's any intent to add support to output, then I'd understand
> the exclusion, since this would make backwards compatibility possible
> (users of "rU+" could have their code broken, since they were doing
> output by hand). Otherwise, it should be allowed, IMO.
That's one possible reason not to do this. It could be added later,
but I think it's better to disallow it for now. Think YAGNI.
--Guido van Rossum (home page: http://www.python.org/~guido/)