[issue28725] Awaiting an awaitable returned from an async function does nothing

2016-11-17 Thread Yury Selivanov
Yury Selivanov added the comment: This isn't a bug. Python doesn't magically unwind awaitables, you have to do that yourself: async def two(): await (await one()) Broadly speaking, returning awaitables from coroutines is an anti-pattern. Closing this one. Feel free to re-open or ask

[issue28725] Awaiting an awaitable returned from an async function does nothing

2016-11-17 Thread Gavin Panella
New submission from Gavin Panella: The following will sleep: async def one(): await asyncio.sleep(10) async def two(): await one() loop.run_until_complete(two()) but the following will not: async def one(): return asyncio.sleep(10) async def two(): await