This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jszakmeister
Recipients eckhardt, jszakmeister
Date 2009-06-08.10:05:11
SpamBayes Score 1.4219856e-07
Marked as misclassified No
Message-id <1244455513.62.0.538771816046.issue4829@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-06-08 10:05:13jszakmeistersetrecipients: + jszakmeister, eckhardt
2009-06-08 10:05:13jszakmeistersetmessageid: <1244455513.62.0.538771816046.issue4829@psf.upfronthosting.co.za>
2009-06-08 10:05:12jszakmeisterlinkissue4829 messages
2009-06-08 10:05:11jszakmeistercreate