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.
This commit is contained in:
Fred Drake 2001-03-10 02:15:37 +00:00
parent 0a3939fc71
commit 198457a978
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ future_check_features(PyFutureFeatures *ff, node *n, char *filename)
REQ(n, import_stmt); /* must by from __future__ import ... */ 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); ch = CHILD(n, i);
if (TYPE(ch) == STAR) { if (TYPE(ch) == STAR) {
PyErr_SetString(PyExc_SyntaxError, PyErr_SetString(PyExc_SyntaxError,