1# Yielding from stopped generator is ok and results in None 2 3def gen(): 4 return 1 5 # This yield is just to make this a generator 6 yield 7 8f = gen() 9 10def run(): 11 print((yield from f)) 12 print((yield from f)) 13 print((yield from f)) 14 15try: 16 next(run()) 17except StopIteration: 18 print("StopIteration") 19