Commit e12f3edf authored by Vitja Makarov's avatar Vitja Makarov

Add test for lambda inside generator

parent 97180987
......@@ -307,3 +307,11 @@ def test_nested_gen(int n):
"""
for a in range(n):
yield (b for b in range(a))
def test_lambda(n):
"""
>>> [i() for i in test_lambda(3)]
[0, 1, 2]
"""
for i in range(n):
yield lambda : i
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