From: Jeremy Hylton Date: Tue, 23 Jan 2001 01:26:20 +0000 (+0000) Subject: Visit the initial test element of the listmaker for a list X-Git-Tag: v2.1a1~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f827f4e9b8cd1117c05246abd4ce7971a94c798;p=python Visit the initial test element of the listmaker for a list comprehension. Fixes bug reported by Tim Peters. --- diff --git a/Python/compile.c b/Python/compile.c index a9ff3dffdb..131f97beb2 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -4210,7 +4210,8 @@ symtable_node(struct symtable *st, node *n) case listmaker: if (NCH(n) > 1 && TYPE(CHILD(n, 1)) == list_for) { symtable_list_comprehension(st, CHILD(n, 1)); - break; + n = CHILD(n, 0); + goto loop; } case atom: if (TYPE(n) == atom && TYPE(CHILD(n, 0)) == NAME) {