Commit 350afcaf authored by Stefan Behnel's avatar Stefan Behnel

fix #675: make 'by' a non-keyword also in .pyx files

parent 4202afd2
......@@ -1432,7 +1432,7 @@ def p_for_from_relation(s):
s.error("Expected one of '<', '<=', '>' '>='")
def p_for_from_step(s):
if s.sy == 'by':
if s.sy == 'IDENT' and s.systring == 'by':
s.next()
step = p_bit_expr(s)
return step
......
......@@ -45,7 +45,7 @@ py_reserved_words = [
pyx_reserved_words = py_reserved_words + [
"include", "ctypedef", "cdef", "cpdef",
"cimport", "by", "DEF", "IF", "ELIF", "ELSE"
"cimport", "DEF", "IF", "ELIF", "ELSE"
]
class Method(object):
......
......@@ -33,7 +33,7 @@ def from_loop_indices():
incremented one step after the last iteration.
"""
cdef int i, j, k
for i from 0 <= i < 10 by get_step(): pass
for i from 0 <= i < 5+5 by get_step(): pass
for j from 0 <= j < 10: pass
for k from 10 > k > 0: pass
return i, j, k
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment