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
edda878b
Commit
edda878b
authored
Nov 15, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
94ed1b5a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-4
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+7
-11
No files found.
Cython/Compiler/ExprNodes.py
View file @
edda878b
...
...
@@ -4141,10 +4141,7 @@ class ComprehensionNode(ScopedExprNode):
def
analyse_declarations
(
self
,
env
):
self
.
append
.
target
=
self
# this is used in the PyList_Append of the inner loop
self
.
init_scope
(
env
)
if
self
.
expr_scope
is
not
None
:
self
.
loop
.
analyse_declarations
(
self
.
expr_scope
)
else
:
self
.
loop
.
analyse_declarations
(
env
)
self
.
loop
.
analyse_declarations
(
self
.
expr_scope
or
env
)
def
init_scope
(
self
,
outer_scope
,
expr_scope
=
None
):
if
expr_scope
is
not
None
:
...
...
Cython/Compiler/ParseTreeTransforms.py
View file @
edda878b
...
...
@@ -1057,21 +1057,17 @@ property NAME:
self
.
seen_vars_stack
.
pop
()
return
node
def
visit_ComprehensionNode
(
self
,
node
):
self
.
visitchildren
(
node
)
node
.
analyse_declarations
(
self
.
env_stack
[
-
1
])
return
node
def
visit_ScopedExprNode
(
self
,
node
):
node
.
analyse_declarations
(
self
.
env_stack
[
-
1
])
if
self
.
seen_vars_stack
:
# the node may or may not have a local scope
if
node
.
expr_scope
:
self
.
seen_vars_stack
.
append
(
set
(
self
.
seen_vars_stack
[
-
1
]))
else
:
self
.
seen_vars_stack
.
append
(
set
())
self
.
env_stack
.
append
(
node
.
expr_scope
)
self
.
visitchildren
(
node
)
self
.
env_stack
.
pop
()
self
.
seen_vars_stack
.
pop
()
else
:
self
.
visitchildren
(
node
)
return
node
def
visit_TempResultFromStatNode
(
self
,
node
):
...
...
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