Mercurial > cpython-lru_cache-weakref
diff Python/future.c @ 17018:7a36f6201c94 legacy-trunk
When iterating over the names imported in a future statement, ignore the
commas in the concrete syntax; checking those causes a segfault.
This fixes SF bug #407394.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Sat, 10 Mar 2001 02:15:37 +0000 |
| parents | 09f6c1372056 |
| children | 59446d0f8341 |
line wrap: on
line diff
--- a/Python/future.c Fri Mar 09 23:15:27 2001 +0000 +++ b/Python/future.c Sat Mar 10 02:15:37 2001 +0000 @@ -19,7 +19,7 @@ REQ(n, import_stmt); /* must by from __future__ import ... */ - for (i = 3; i < NCH(n); ++i) { + for (i = 3; i < NCH(n); i += 2) { ch = CHILD(n, i); if (TYPE(ch) == STAR) { PyErr_SetString(PyExc_SyntaxError,
