[Python-Dev] async/await in Python; v2

Greg greg.ewing at canterbury.ac.nz
Thu Apr 23 06:38:06 CEST 2015


On 23/04/2015 6:32 a.m., Andrew Svetlov wrote:
> If we forbid to call `async def` from regualr code how asyncio should
> work? I'd like to push `async def` everywhere in asyncio API where
> asyncio.coroutine required.

As I suggested earlier, a way could be provided to mark a
function as callable using either yield from f() or await f().
That would water down the error catching ability a bit, but
it would allow interoperability with existing asyncio code.

-- 
Greg



More information about the Python-Dev mailing list