[I18n-sig] Modified open() builtin (Re: Python Character Model)

Tim Peters tim.one@home.com
Sun, 11 Feb 2001 16:32:08 -0500

> ...
> instead of overriding, why not append the encoding to
> the mode parameter:


>     "r" # default, read text file, unknown encoding
>     "rb" # read binary file, no encoding"
>     "r,utf-8" # read text file, utf-8 encoding
>     "rb,ascii" # illegal mode

Don't know why the last should be illegal; whether I want line-end
translation done, or want Ctrl-Z to signify EOF, or etc (all the goofy
x-platform distinctions made by binary vs text modes) seems independent of
how character data is encoded.