# Real Python AsyncIO Walkthrough https://realpython.com/async-io-python/ ## Rules of Async Coroutines ```python async def f(x): y = await z(x) # OK - `await` and `return` allowed in coroutines return y async def g(x): yield x # OK - this is an async generator async def m(x): yield from gen(x) # No - SyntaxError def m(x): y = await z(x) # Still no - SyntaxError (no `async def` here) return y ``` An awaitable object is either (1) another coroutine or (2) an object defining an .__await__() dunder method that returns an iterator.