Brett Cannon <br...@python.org> added the comment: >From Eric Smith on python-dev:
> + suffix, mode, type_ = details > + if mode and (not mode.startswith(('r', 'U'))) or '+' in mode: > + raise ValueError('invalid file open mode {!r}'.format(mode)) Should this be: if mode and (not mode.startswith(('r', 'U')) or '+' in mode): to match: > - if (*mode) { ... > - if (!(*mode == 'r' || *mode == 'U') || strchr(mode, '+')) { > - PyErr_Format(PyExc_ValueError, > - "invalid file open mode %.200s", mode); ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13959> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com