Commit 58c92bb6 authored by Stefan Behnel's avatar Stefan Behnel

adapt test to changes in CPython 3.4+

parent 60c30e4e
# mode: run
# tag: generators, lambda
try:
from builtins import next # Py3k
except ImportError:
def next(it):
return it.next()
def test_inside_lambda():
"""
......@@ -14,8 +9,7 @@ def test_inside_lambda():
1
>>> next(obj)
2
>>> next(obj)
Traceback (most recent call last):
StopIteration
>>> try: next(obj)
... except StopIteration: pass
"""
return lambda:((yield 1), (yield 2))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment