Commit d5c80a3d authored by Robert Bradshaw's avatar Robert Bradshaw

Nested generator test.

parent 11850664
......@@ -299,3 +299,11 @@ def test_inside_lambda():
('a', 'b')
"""
return lambda:((yield 1), (yield 2))
def test_nested_gen(int n):
"""
>>> [list(a) for a in test_nested_gen(5)]
[[], [0], [0, 1], [0, 1, 2], [0, 1, 2, 3]]
"""
for a in range(n):
yield (b for b in range(a))
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