
report at bugs
Apr 16, 2012, 8:48 AM
Post #11 of 56
(183 views)
Permalink
|
|
[issue13959] Re-implement parts of imp in pure Python
[In reply to]
|
|
Brett Cannon <brett [at] python> 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 <report [at] bugs> <http://bugs.python.org/issue13959> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|