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
131e416d
Commit
131e416d
authored
May 16, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extended test case
parent
af0741b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
tests/run/enumerate_T316.pyx
tests/run/enumerate_T316.pyx
+43
-0
No files found.
tests/run/enumerate_T316.pyx
View file @
131e416d
...
...
@@ -31,6 +31,28 @@ __doc__ = u"""
2 2 2 3
3 3 3 4
>>> multi_c_enumerate()
0 0 0 1
1 1 1 2
2 2 2 3
3 3 3 4
>>> py_enumerate_break(1,2,3,4)
0 1
:: 0 1
>>> py_enumerate_return()
:: 55 99
>>> py_enumerate_return(1,2,3,4)
0 1
>>> py_enumerate_continue(1,2,3,4)
0 1
1 2
2 3
3 4
:: 3 4
"""
def
go_py_enumerate
():
...
...
@@ -47,6 +69,27 @@ def go_c_enumerate_step():
for
i
,
k
in
enumerate
(
range
(
1
,
7
,
2
)):
print
i
,
k
def
py_enumerate_break
(
*
t
):
i
,
k
=
55
,
99
for
i
,
k
in
enumerate
(
t
):
print
i
,
k
break
print
u"::"
,
i
,
k
def
py_enumerate_return
(
*
t
):
i
,
k
=
55
,
99
for
i
,
k
in
enumerate
(
t
):
print
i
,
k
return
print
u"::"
,
i
,
k
def
py_enumerate_continue
(
*
t
):
i
,
k
=
55
,
99
for
i
,
k
in
enumerate
(
t
):
print
i
,
k
continue
print
u"::"
,
i
,
k
def
empty_c_enumerate
():
cdef
int
i
=
55
,
k
=
99
for
i
,
k
in
enumerate
(
range
(
0
)):
...
...
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