[Python-Dev] other "magic strings" issues

Bill Janssen janssen at parc.com
Fri Nov 7 18:25:31 EST 2003

> myFile = file(filename, 'rb')
> (while of course we're going to keep accepting it forever) is not quite as=
> readable and maintainable as, e.g.:
> myFile = file(filename, file.READ + file.BINARY)

Actually, the default should be BINARY, however it works.  I think
it's insane that 'r' works on Unix but breaks on Windows when reading
a JPEG file.


More information about the Python-Dev mailing list