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
4dcc1ed6
Commit
4dcc1ed6
authored
Aug 12, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
0e1915fc
a0ad3f7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
tests/run/inlined_generator_expressions.pyx
tests/run/inlined_generator_expressions.pyx
+8
-8
No files found.
tests/run/inlined_generator_expressions.pyx
View file @
4dcc1ed6
...
@@ -83,9 +83,9 @@ def return_range_sum_squares(int N):
...
@@ -83,9 +83,9 @@ def return_range_sum_squares(int N):
>>> return_range_sum_squares(10)
>>> return_range_sum_squares(10)
285
285
>>>
sum([i*i for i in range(10000)]
)
>>>
print(sum([i*i for i in range(10000)])
)
333283335000
333283335000
>>>
return_range_sum_squares(10000
)
>>>
print(return_range_sum_squares(10000)
)
333283335000
333283335000
"""
"""
return
sum
(
i
*
i
for
i
in
range
(
N
))
return
sum
(
i
*
i
for
i
in
range
(
N
))
...
@@ -101,9 +101,9 @@ def return_sum_squares(seq):
...
@@ -101,9 +101,9 @@ def return_sum_squares(seq):
>>> return_sum_squares(range(10))
>>> return_sum_squares(range(10))
285
285
>>>
sum([i*i for i in range(10000)]
)
>>>
print(sum([i*i for i in range(10000)])
)
333283335000
333283335000
>>>
return_sum_squares(range(10000
))
>>>
print(return_sum_squares(range(10000)
))
333283335000
333283335000
"""
"""
return
sum
(
i
*
i
for
i
in
seq
)
return
sum
(
i
*
i
for
i
in
seq
)
...
@@ -119,9 +119,9 @@ def return_sum_squares_start(seq, int start):
...
@@ -119,9 +119,9 @@ def return_sum_squares_start(seq, int start):
>>> return_sum_squares_start(range(10), -1)
>>> return_sum_squares_start(range(10), -1)
284
284
>>>
sum([i*i for i in range(10000)], 9
)
>>>
print(sum([i*i for i in range(10000)], 9)
)
333283335009
333283335009
>>>
return_sum_squares_start(range(10000), 9
)
>>>
print(return_sum_squares_start(range(10000), 9)
)
333283335009
333283335009
"""
"""
return
sum
((
i
*
i
for
i
in
seq
),
start
)
return
sum
((
i
*
i
for
i
in
seq
),
start
)
...
@@ -140,9 +140,9 @@ def return_typed_sum_squares_start(seq, int start):
...
@@ -140,9 +140,9 @@ def return_typed_sum_squares_start(seq, int start):
>>> return_typed_sum_squares_start(range(10), -1)
>>> return_typed_sum_squares_start(range(10), -1)
284
284
>>>
sum([i*i for i in range(1000)], 9
)
>>>
print(sum([i*i for i in range(1000)], 9)
)
332833509
332833509
>>>
return_typed_sum_squares_start(range(1000), 9
)
>>>
print(return_typed_sum_squares_start(range(1000), 9)
)
332833509
332833509
"""
"""
cdef
int
i
cdef
int
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