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
d9d5ebb9
Commit
d9d5ebb9
authored
Apr 14, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new test for auto_cpdef with closure functions
parent
e8cc17ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
tests/bugs.txt
tests/bugs.txt
+1
-0
tests/run/auto_cpdef_closures.py
tests/run/auto_cpdef_closures.py
+22
-0
No files found.
tests/bugs.txt
View file @
d9d5ebb9
...
...
@@ -19,6 +19,7 @@ for_from_pyvar_loop_T601
decorators_T593
temp_sideeffects_T654
class_scope_T671
auto_cpdef_closures
# CPython regression tests that don't current work:
pyregr.test_threadsignals
...
...
tests/run/auto_cpdef_closures.py
0 → 100644
View file @
d9d5ebb9
# cython: auto_cpdef=True
# mode:run
# tag: directive,auto_cpdef,closures
def
closure_func
(
x
):
"""
>>> c = closure_func(2)
>>> c()
2
"""
def
c
():
return
x
return
c
def
generator_func
():
"""
>>> for i in generator_func(): print(i)
1
2
"""
yield
1
yield
2
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