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
c758cc37
Commit
c758cc37
authored
Nov 25, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extended test cases for scoped genexprs at module level
parent
47fb329a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
tests/run/cython3.pyx
tests/run/cython3.pyx
+20
-0
No files found.
tests/run/cython3.pyx
View file @
c758cc37
...
...
@@ -76,6 +76,26 @@ def list_comp():
assert
x
==
'abc'
# don't leak in Py3 code
return
result
module_level_lc
=
[
module_level_loopvar
*
2
for
module_level_loopvar
in
range
(
4
)
]
def
list_comp_module_level
():
"""
>>> module_level_lc
[0, 2, 4, 6]
>>> module_level_loopvar
Traceback (most recent call last):
NameError: name 'module_level_loopvar' is not defined
"""
module_level_list_genexp
=
list
(
module_level_genexp_loopvar
*
2
for
module_level_genexp_loopvar
in
range
(
4
))
def
genexpr_module_level
():
"""
>>> module_level_list_genexp
[0, 2, 4, 6]
>>> module_level_genexp_loopvar
Traceback (most recent call last):
NameError: name 'module_level_genexp_loopvar' is not defined
"""
def
list_comp_unknown_type
(
l
):
"""
>>> list_comp_unknown_type(range(5))
...
...
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