Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 16138:49b7c1bc6004 legacy-trunk
Visit the initial test element of the listmaker for a list
comprehension. Fixes bug reported by Tim Peters.
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Tue, 23 Jan 2001 01:26:20 +0000 |
| parents | 883cb0e31bb2 |
| children | aab871635ffa |
line wrap: on
line diff
--- a/Python/compile.c Tue Jan 23 00:50:52 2001 +0000 +++ b/Python/compile.c Tue Jan 23 01:26:20 2001 +0000 @@ -4210,7 +4210,8 @@ 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) {
