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
Boxiang Sun
cython
Commits
9a9ca635
Commit
9a9ca635
authored
Jan 12, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add no_assignment_synthesis flag to DefNode
parent
2e3f542d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
9a9ca635
...
...
@@ -4955,10 +4955,8 @@ class GeneratorExpressionNode(LambdaNode):
binding
=
False
def
analyse_declarations
(
self
,
env
):
# XXX: dirty hack to disable assignment synthesis
self
.
def_node
.
needs_assignment_synthesis
=
lambda
*
args
,
**
kwargs
:
False
self
.
def_node
.
no_assignment_synthesis
=
True
self
.
def_node
.
analyse_declarations
(
env
)
#super(GeneratorExpressionNode, self).analyse_declarations(env)
env
.
add_lambda_def
(
self
.
def_node
)
def
generate_result_code
(
self
,
code
):
...
...
Cython/Compiler/Nodes.py
View file @
9a9ca635
...
...
@@ -1892,6 +1892,7 @@ class DefNode(FuncDefNode):
num_required_kw_args
=
0
reqd_kw_flags_cname
=
"0"
is_wrapper
=
0
no_assignment_synthesis
=
0
decorators
=
None
return_type_annotation
=
None
entry
=
None
...
...
@@ -2227,6 +2228,8 @@ class DefNode(FuncDefNode):
self
.
synthesize_assignment_node
(
env
)
def
needs_assignment_synthesis
(
self
,
env
,
code
=
None
):
if
self
.
no_assignment_synthesis
:
return
False
# Should enable for module level as well, that will require more testing...
if
self
.
entry
.
is_anonymous
:
return
True
...
...
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