[issue16625] Exception on mode 'br'

Chris Jerdonek report at bugs.python.org
Thu Dec 6 09:43:18 CET 2012


Chris Jerdonek added the comment:

Is this issue just for 2.7?  3.3 was selected as the affected version, but the error message text seems limited to 2.7:

http://hg.python.org/cpython/file/0adfbafe8a99/Objects/fileobject.c#l303

The exception can be reproduced simply using 2.7:

>>> open('foo', 'br')
ValueError: mode string must begin with one of 'r', 'w', 'a' or 'U', not 'br'

Moreover, the 2.7 documentation says that "b" must be appended (in particular occurring after "r"), which to me means that the exception and message is correct:

http://docs.python.org/2/library/functions.html#open

----------
nosy: +chris.jerdonek

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16625>
_______________________________________


More information about the Python-bugs-list mailing list