.. _yield-inside-async-function: yield-inside-async-function / E1700 =================================== **Message emitted:** Yield inside async function **Description:** *Used when an `yield` or `yield from` statement is found inside an async function.* **Correct code:** .. code-block:: python async def foo(): def _inner_foo(): yield from [1, 2, 3] async def foo(): yield 42 **Problematic code:** .. code-block:: python async def foo(): yield from [1, 2, 3] # [yield-inside-async-function] **Additional details:** The message can't be emitted when using Python < 3.5. **Related links:** - `PEP 525 `_ Created by ``async`` checker