From: Fred Drake Date: Sat, 10 Mar 2001 02:15:37 +0000 (+0000) Subject: When iterating over the names imported in a future statement, ignore the X-Git-Tag: v2.1b2~196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=198457a9789cbb176d7d0b3c8b38254b33836deb;p=python 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. --- diff --git a/Python/future.c b/Python/future.c index 89466f0699..cf2dca5ea5 100644 --- a/Python/future.c +++ b/Python/future.c @@ -19,7 +19,7 @@ future_check_features(PyFutureFeatures *ff, node *n, char *filename) 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,