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
Kirill Smelkov
cython
Commits
a687fae6
Commit
a687fae6
authored
Jul 10, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another closure test.
parent
83910594
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
tests/bugs.txt
tests/bugs.txt
+0
-1
tests/run/closure_self.pyx
tests/run/closure_self.pyx
+16
-0
No files found.
tests/bugs.txt
View file @
a687fae6
...
@@ -6,7 +6,6 @@ unsignedbehaviour_T184
...
@@ -6,7 +6,6 @@ unsignedbehaviour_T184
missing_baseclass_in_predecl_T262
missing_baseclass_in_predecl_T262
cfunc_call_tuple_args_T408
cfunc_call_tuple_args_T408
cpp_structs
cpp_structs
closure_inside_cdef_T554
genexpr_iterable_lookup_T600
genexpr_iterable_lookup_T600
generator_expressions_in_class
generator_expressions_in_class
for_from_pyvar_loop_T601
for_from_pyvar_loop_T601
...
...
tests/run/closure_self.pyx
View file @
a687fae6
...
@@ -38,3 +38,19 @@ cdef class SelfInClosure(object):
...
@@ -38,3 +38,19 @@ cdef class SelfInClosure(object):
def
nested
():
def
nested
():
return
self
.
x
,
t
.
x
return
self
.
x
,
t
.
x
return
nested
return
nested
def
call_closure_method_cdef_attr_c
(
self
,
Test
t
):
"""
>>> o = SelfInClosure()
>>> o.call_closure_method_cdef_attr_c(Test())()
(1, 2)
"""
return
self
.
closure_method_cdef_attr_c
(
t
)
cdef
closure_method_cdef_attr_c
(
self
,
Test
t
):
t
.
x
=
2
self
.
_t
=
t
self
.
x
=
1
def
nested
():
return
self
.
x
,
t
.
x
return
nested
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