]> granicus.if.org Git - python/commitdiff
Visit the initial test element of the listmaker for a list
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 23 Jan 2001 01:26:20 +0000 (01:26 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 23 Jan 2001 01:26:20 +0000 (01:26 +0000)
comprehension.  Fixes bug reported by Tim Peters.

Python/compile.c

index a9ff3dffdb56d6b81e1dc5637ecc87bdb5bc7d9d..131f97beb2ccbf6222426a5763c41d309ee0e812 100644 (file)
@@ -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) {