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
b0a4fa4a
Commit
b0a4fa4a
authored
Jul 06, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
yet another Py2.5 fix
parent
b612885e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
tests/run/yield_from_pep380.pyx
tests/run/yield_from_pep380.pyx
+7
-2
No files found.
tests/run/yield_from_pep380.pyx
View file @
b0a4fa4a
...
@@ -9,10 +9,17 @@ see <http://www.cosc.canterbury.ac.nz/greg.ewing/python/yield-from/YieldFrom-Pyt
...
@@ -9,10 +9,17 @@ see <http://www.cosc.canterbury.ac.nz/greg.ewing/python/yield-from/YieldFrom-Pyt
import
sys
import
sys
try
:
_next
=
next
# not in Py<=2.5
except
NameError
:
def
_next
(
it
):
return
it
.
next
()
def
_lines
(
trace
):
def
_lines
(
trace
):
for
line
in
trace
:
for
line
in
trace
:
print
(
line
)
print
(
line
)
def
test_delegation_of_initial_next_to_subgenerator
():
def
test_delegation_of_initial_next_to_subgenerator
():
"""
"""
>>> _lines(test_delegation_of_initial_next_to_subgenerator())
>>> _lines(test_delegation_of_initial_next_to_subgenerator())
...
@@ -1006,8 +1013,6 @@ def test_delegating_generators_claim_to_be_running_close():
...
@@ -1006,8 +1013,6 @@ def test_delegating_generators_claim_to_be_running_close():
return
ret
return
ret
_next
=
next
# keep it around for Py<=2.5
def
yield_in_return
(
x
):
def
yield_in_return
(
x
):
"""
"""
>>> x = yield_in_return(range(3))
>>> x = yield_in_return(range(3))
...
...
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