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
507efb5a
Commit
507efb5a
authored
Nov 30, 2008
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
068db1d6
ae79cef7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
tests/run/r_forloop.pyx
tests/run/r_forloop.pyx
+45
-0
No files found.
tests/run/r_forloop.pyx
View file @
507efb5a
...
@@ -4,46 +4,91 @@ __doc__ = u"""
...
@@ -4,46 +4,91 @@ __doc__ = u"""
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
>>> go_py_ret()
2
>>> go_c()
>>> go_c()
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
>>> go_c_ret()
2
>>> go_list()
>>> go_list()
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
>>> go_list_ret()
2
>>> go_tuple()
>>> go_tuple()
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
Spam!
>>> go_tuple_ret()
2
>>> go_dict()
Spam!
Spam!
Spam!
Spam!
>>> go_dict_ret()
2
"""
"""
def
go_py
():
def
go_py
():
for
i
in
range
(
4
):
for
i
in
range
(
4
):
print
u"Spam!"
print
u"Spam!"
def
go_py_ret
():
for
i
in
range
(
4
):
if
i
>
1
:
return
i
def
go_c
():
def
go_c
():
cdef
int
i
cdef
int
i
for
i
in
range
(
4
):
for
i
in
range
(
4
):
print
u"Spam!"
print
u"Spam!"
def
go_c_ret
():
cdef
int
i
for
i
in
range
(
4
):
if
i
>
1
:
return
i
def
go_list
():
def
go_list
():
cdef
list
l
=
range
(
4
)
cdef
list
l
=
range
(
4
)
for
i
in
l
:
for
i
in
l
:
print
u"Spam!"
print
u"Spam!"
def
go_list_ret
():
cdef
list
l
=
range
(
4
)
for
i
in
l
:
if
i
>
1
:
return
i
def
go_tuple
():
def
go_tuple
():
cdef
tuple
t
=
tuple
(
range
(
4
))
cdef
tuple
t
=
tuple
(
range
(
4
))
for
i
in
t
:
for
i
in
t
:
print
u"Spam!"
print
u"Spam!"
def
go_tuple_ret
():
cdef
tuple
t
=
tuple
(
range
(
4
))
for
i
in
t
:
if
i
>
1
:
return
i
def
go_dict
():
def
go_dict
():
cdef
dict
d
=
dict
(
zip
(
range
(
4
),
range
(
4
)))
cdef
dict
d
=
dict
(
zip
(
range
(
4
),
range
(
4
)))
for
i
in
d
:
for
i
in
d
:
print
u"Spam!"
print
u"Spam!"
def
go_dict_ret
():
cdef
dict
d
=
dict
(
zip
(
range
(
4
),
range
(
4
)))
for
i
in
d
:
if
i
>
1
and
i
<
3
:
return
i
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