[Python-Dev] Next version of PEP278 - universal newline support -
available
Paul Prescod
paul@prescod.net
2002年3月13日 17:30:53 -0800
Fredrik Lundh wrote:
>> someone wrote:
>> > (alternate idea: instead of adding a non-standard mode
> > flag, how about a "textfile" constructor?)
>> with the following signature, perhaps:
>> f = textfile(filename, mode="r", encoding=None)
Enthusiastic +1.
But I think that encoding should default to "ASCII". We also need to
discuss under what circumstances textfile("foo").read() returns Unicode
string versus 8-bit string.
Paul Prescod