[Python-checkins] r45285 - python/trunk/Grammar/Grammar
thomas.wouters
python-checkins at python.org
Wed Apr 12 02:06:35 CEST 2006
Author: thomas.wouters
Date: Wed Apr 12 02:06:34 2006
New Revision: 45285
Modified:
python/trunk/Grammar/Grammar
Log:
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.
Modified: python/trunk/Grammar/Grammar
==============================================================================
--- python/trunk/Grammar/Grammar (original)
+++ python/trunk/Grammar/Grammar Wed Apr 12 02:06:34 2006
@@ -131,11 +131,11 @@
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)*
More information about the Python-checkins
mailing list