Fix SF bug #1466641: multiple adjacent 'if's in listcomps and genexps, as in

[x for x in it if x if x], were broken for no good reason by the PEP 308
patch.
This commit is contained in:
Thomas Wouters 2006-04-12 00:06:34 +00:00
parent 9cb28bea04
commit bb64e511c8

View file

@ -131,11 +131,11 @@ argument: test [gen_for] | test '=' test # Really [keyword '='] test
list_iter: list_for | list_if
list_for: 'for' exprlist 'in' testlist_safe [list_iter]
list_if: 'if' test [list_iter]
list_if: 'if' old_test [list_iter]
gen_iter: gen_for | gen_if
gen_for: 'for' exprlist 'in' or_test [gen_iter]
gen_if: 'if' test [gen_iter]
gen_if: 'if' old_test [gen_iter]
testlist1: test (',' test)*