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
Gwenaël Samain
cython
Commits
b67d841c
Commit
b67d841c
authored
Jul 17, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved new listcomp test over to existing test module for list comprehensions
parent
31eebced
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
tests/run/list_comprehension.pyx
tests/run/list_comprehension.pyx
+0
-8
tests/run/listcomp.pyx
tests/run/listcomp.pyx
+8
-0
No files found.
tests/run/list_comprehension.pyx
deleted
100644 → 0
View file @
31eebced
def
foo
():
"""
>>> foo()
[[], [-1], [-1, 0], [-1, 0, 1]]
"""
result
=
[[
a
-
1
for
a
in
range
(
b
)]
for
b
in
range
(
4
)]
return
result
tests/run/listcomp.pyx
View file @
b67d841c
...
@@ -55,3 +55,11 @@ def global_listcomp():
...
@@ -55,3 +55,11 @@ def global_listcomp():
>>> listcomp_result
>>> listcomp_result
[0, 1, 4, 9, 16]
[0, 1, 4, 9, 16]
"""
"""
def
nested_result
():
"""
>>> nested_result()
[[], [-1], [-1, 0], [-1, 0, 1]]
"""
result
=
[[
a
-
1
for
a
in
range
(
b
)]
for
b
in
range
(
4
)]
return
result
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