[Python-Dev] PEP 278 - finished?

Fredrik Lundh fredrik@pythonware.com
Thu, 11 Apr 2002 22:01:45 +0200


> Unclear.  If files opened in regular text mode and binary mode, in
> read mode, write mode, append mode, and update mode, are all the same
> text object, I think Universal newlines are just another minor
> variation.

there's enough "Mode U cannot be combined" stuff in the
PEP to make me think that they're slightly more than just a
minor variation.

I think you can simplify the PEP somewhat by emphasizing
the difference.  making things simpler is never a bad idea.

> Also, changing the mode is a morelocalized change (it's all in
> fileobject.c).

I'm willing to do the work necessary to provide an alternate
factory/constructor.  from what I can tell, all that has to be
done is is to apply the patch, and do some fairly straight-
forward refactoring.

(and perhaps some slight API renaming -- the functions in
there are clearly too useful to deserve names like
Py_UniversalNewlineFgets -- "there is no permanent place in this
world for ugly names" ;-)

so +1 on checking it in as it stands, but -0 on not touching
the result until 2.3 final...

</F>