Message158474
| Author |
brett.cannon |
| Recipients |
Arfrever, berker.peksag, brett.cannon, eric.araujo, eric.snow, meador.inge, pitrou, python-dev |
| Date |
2012年04月16日.15:48:30 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334591311.23.0.134163970162.issue13959@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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); |
|