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
366b16c6
Commit
366b16c6
authored
6 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.28.x'
parents
ae63762a
eae37760
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
tests/run/generators_py.py
tests/run/generators_py.py
+0
-11
tests/run/generators_py35.py
tests/run/generators_py35.py
+24
-0
No files found.
tests/run/generators_py.py
View file @
366b16c6
...
...
@@ -81,17 +81,6 @@ def with_outer(*args):
yield
i
return
generator
def
with_outer_raising
(
*
args
):
"""
>>> x = with_outer_raising(1, 2, 3)
>>> list(x())
[1, 2, 3]
"""
def
generator
():
for
i
in
args
:
yield
i
raise
StopIteration
return
generator
def
test_close
():
"""
...
...
This diff is collapsed.
Click to expand it.
tests/run/generators_py35.py
0 → 100644
View file @
366b16c6
# mode: run
# tag: generators, pure3.5
from
__future__
import
generator_stop
# "generator_stop" was only added in Py3.5.
def
with_outer_raising
(
*
args
):
"""
>>> x = with_outer_raising(1, 2, 3)
>>> try:
... list(x())
... except RuntimeError:
... print("OK!")
... else:
... print("NOT RAISED!")
OK!
"""
def
generator
():
for
i
in
args
:
yield
i
raise
StopIteration
return
generator
This diff is collapsed.
Click to expand it.
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