John Szakmeister <j...@szakmeister.net> added the comment:

The offending lines in io.py are:
    modes = set(mode)
    if modes - set("arwb+tU") or len(mode) > len(modes):
        raise ValueError("invalid mode: %r" % mode)

In particular, the "or len(mode) > len(modes)" is picking off the fact 
that there is repeated mode characters.  Leaving that off allows 
io.open() to behave exactly like the built-in open() call.

OTOH, someone obviously wanted to make sure that repeat mode characters 
were not allowed.  So I guess someone needs to rule on whether we want 
io.open() and io.FileIO() to behave like the built-in, or to keep things 
more strict.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4829>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to