Python 3.x3.3
Use yield from if you want to yield all values from another iterable:
def foob(x):
yield from range(x * 2)
yield from range(2)
list(foob(5)) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1]
This works with generators as well.
def fibto(n):
a, b = 1, 1
while True:
...