circuitpython/tests/basics/gen-yield-from-iter.py
Paul Sokolovsky f39d3b93da py: Implement support for generalized generator protocol.
Iterators and ducktype objects can now be arguments of yield from.
2014-03-30 23:30:16 +03:00

9 lines
110 B
Python

def gen():
yield from (1, 2, 3)
def gen2():
yield from gen()
print(list(gen()))
print(list(gen2()))