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
3dc1d68b
Commit
3dc1d68b
authored
Mar 29, 2012
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
visit children nodes, fix regression
parent
7ef9c72f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+2
-4
tests/run/attribute_and_lambda.pyx
tests/run/attribute_and_lambda.pyx
+13
-0
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
3dc1d68b
...
@@ -1789,10 +1789,8 @@ class AnalyseExpressionsTransform(CythonTransform):
...
@@ -1789,10 +1789,8 @@ class AnalyseExpressionsTransform(CythonTransform):
return
node
return
node
def
visit_AttributeNode
(
self
,
node
):
def
visit_AttributeNode
(
self
,
node
):
# Note: Expression analysis for attributes has already happened
self
.
visitchildren
(
node
)
# at this point (by recursive calls starting from FuncDefNode)
#print node.dump()
#return node
type
=
node
.
obj
.
type
type
=
node
.
obj
.
type
if
type
.
is_extension_type
and
type
.
objstruct_cname
==
'PyArrayObject'
:
if
type
.
is_extension_type
and
type
.
objstruct_cname
==
'PyArrayObject'
:
from
NumpySupport
import
numpy_transform_attribute_node
from
NumpySupport
import
numpy_transform_attribute_node
...
...
tests/run/attribute_and_lambda.pyx
0 → 100644
View file @
3dc1d68b
# mode: run
# tags: lambda, attribute, regression
class
TestClass
(
object
):
bar
=
123
def
test_attribute_and_lambda
(
f
):
"""
>>> test_attribute_and_lambda(lambda _: TestClass())
123
"""
return
f
(
lambda
x
:
x
).
bar
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