Where does a Python generator's return value go? StopIteration.value and PEP 479
A generator's return value never shows up in a for loop; it rides on StopIteration.value. How yield from gets it, why StopIteration in a generator becomes RuntimeError, and what close() returns.
DevelopmentPythonGeneratorsExceptions