[Python-Dev] PEP 278 - finished?

Guido van Rossum guido@python.org
Thu, 11 Apr 2002 15:07:13 -0400


> One more:
> 
> - Why isn't "rU+" allowed? It's understandable that "+" is not allowed
>   for output, but I can't see a good reason why it shouldn't be allowed
>   to open file for read/write, and read with universal support (maybe
>   some implementation detail?). Allowing this would even easy the task,
>   since when writting to the file the programmer could consider the
>   newlines attribute, if he wants.

This is answered by the PEP:

       """
       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.
       """

--Guido van Rossum (home page: http://www.python.org/~guido/)