From: Stefan Behnel Date: Wed, 26 May 2010 14:18:32 +0000 (+0200) Subject: move 'for from' syntax out of the way in Python file compilation X-Git-Tag: 0.13.beta0~69 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8952731e01c3d3e0118e745fbb96dc588f8d140;p=cython.git move 'for from' syntax out of the way in Python file compilation --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 799480fa..c310a616 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -1216,7 +1216,7 @@ def p_for_bounds(s): s.next() iterator = p_for_iterator(s) return { 'target': target, 'iterator': iterator } - else: + elif not s.in_python_file: if s.sy == 'from': s.next() bound1 = p_bit_expr(s) @@ -1248,6 +1248,9 @@ def p_for_bounds(s): 'relation2': rel2, 'bound2': bound2, 'step': step } + else: + s.expect('in') + return {} def p_for_from_relation(s): if s.sy in inequality_relations: