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
2b1548d8
Commit
2b1548d8
authored
Mar 09, 2010
by
Craig Citro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for autotestdict & property not playing well together.
parent
1c9b9fba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
Cython/Compiler/AnalysedTreeTransforms.py
Cython/Compiler/AnalysedTreeTransforms.py
+12
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-1
tests/run/extpropertyref.pyx
tests/run/extpropertyref.pyx
+5
-0
No files found.
Cython/Compiler/AnalysedTreeTransforms.py
View file @
2b1548d8
...
...
@@ -6,6 +6,7 @@ from PyrexTypes import py_object_type
from
Builtin
import
dict_type
from
StringEncoding
import
EncodedString
import
Naming
import
Symtab
class
AutoTestDictTransform
(
ScopeTrackingTransform
):
# Handles autotestdict directive
...
...
@@ -82,6 +83,16 @@ class AutoTestDictTransform(ScopeTrackingTransform):
type
=
py_object_type
,
is_py_attr
=
True
,
is_temp
=
True
)
if
isinstance
(
node
.
entry
.
scope
,
Symtab
.
PropertyScope
):
new_node
=
AttributeNode
(
pos
,
obj
=
parent
,
attribute
=
node
.
entry
.
scope
.
name
,
type
=
py_object_type
,
is_py_attr
=
True
,
is_temp
=
True
)
parent
=
new_node
name
=
"%s.%s.%s"
%
(
clsname
,
node
.
entry
.
scope
.
name
,
node
.
entry
.
name
)
else
:
name
=
"%s.%s"
%
(
clsname
,
node
.
entry
.
name
)
else
:
assert
False
...
...
Cython/Compiler/Nodes.py
View file @
2b1548d8
...
...
@@ -1726,7 +1726,7 @@ class PyArgDeclNode(Node):
class
DecoratorNode
(
Node
):
# A decorator
#
# decorator NameNode or CallNode
# decorator NameNode or CallNode
or AttributeNode
child_attrs
=
[
'decorator'
]
...
...
tests/run/extpropertyref.pyx
View file @
2b1548d8
...
...
@@ -3,12 +3,17 @@ cdef class Spam:
property
eggs
:
def
__get__
(
self
):
"""
This is the docstring for Spam.eggs.__get__
"""
return
42
def
tomato
():
"""
>>> tomato()
42
>>> sorted(__test__.keys())
[u'Spam.eggs.__get__ (line 5)', u'tomato (line 11)']
"""
cdef
Spam
spam
cdef
object
lettuce
...
...
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