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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
cb858c83
Commit
cb858c83
authored
Jan 31, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix constant_result of SliceNode
parent
79f7d7f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+6
-6
No files found.
Cython/Compiler/ExprNodes.py
View file @
cb858c83
...
...
@@ -2691,14 +2691,16 @@ class SliceNode(ExprNode):
# stop ExprNode
# step ExprNode
subexprs
=
[
'start'
,
'stop'
,
'step'
]
type
=
py_object_type
is_temp
=
1
def
calculate_constant_result
(
self
):
self
.
constant_result
=
s
elf
.
base
.
constant_result
[
self
.
start
.
constant_result
:
\
self
.
stop
.
constant_result
:
\
self
.
step
.
constant_result
]
self
.
constant_result
=
s
lice
(
self
.
start
.
constant_result
,
self
.
stop
.
constant_result
,
self
.
step
.
constant_result
)
def
compile_time_value
(
self
,
denv
):
start
=
self
.
start
.
compile_time_value
(
denv
)
...
...
@@ -2715,8 +2717,6 @@ class SliceNode(ExprNode):
except
Exception
,
e
:
self
.
compile_time_value_error
(
e
)
subexprs
=
[
'start'
,
'stop'
,
'step'
]
def
analyse_types
(
self
,
env
):
self
.
start
.
analyse_types
(
env
)
self
.
stop
.
analyse_types
(
env
)
...
...
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