There is another yield
use and meaning (since Python 3.3):
yield from <expr>
From PEP 380 -- Syntax for Delegating to a Subgenerator:
A syntax is proposed for a generator to delegate part of its operations to another generator. This allows a section of code containing 'yield' to be factored out and placed in another generator. Additionally, the subgenerator is allowed to return with a value, and the value is made available to the delegating generator.
The new syntax also opens up some opportunities for optimisation when one generator re-yields values produced by another.
Moreover this will introduce (since Python 3.5):
async def new_coroutine(data):
...
await blocking_action()
to avoid coroutines being confused with a regular generator (today yield
is used in both).