Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
350afcaf
Commit
350afcaf
authored
Apr 13, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #675: make 'by' a non-keyword also in .pyx files
parent
4202afd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+1
-1
Cython/Compiler/Scanning.py
Cython/Compiler/Scanning.py
+1
-1
tests/run/for_decrement.pyx
tests/run/for_decrement.pyx
+1
-1
No files found.
Cython/Compiler/Parsing.py
View file @
350afcaf
...
...
@@ -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
...
...
Cython/Compiler/Scanning.py
View file @
350afcaf
...
...
@@ -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
):
...
...
tests/run/for_decrement.pyx
View file @
350afcaf
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment