mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
9cb28bea04
commit
bb64e511c8
1 changed files with 2 additions and 2 deletions
|
@ -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)*
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue