[Python-ideas] async/await in Python

Luciano Ramalho luciano at ramalho.org
Mon Apr 20 10:17:09 CEST 2015


Yuri, thank you for writing PEP 492!

Victor Stinner reviewed the asyncio chapter in my book, Fluent Python
[1], and he saw how much I complained about the overloading of `def`
to define objects as different as functions, generators and
coroutines, and about `yield from` which doesn't say anything to me or
to many others to whom I've talked.

With `async def` and `await` you solve both these problems! Also,
`async with` and `async for` are brilliant. For the first time ever
coroutines will be real first class citizens in Python!

[1] http://shop.oreilly.com/product/0636920032519.do

Alas, the book [1] is entering final production so it won't cover
Python 3.5, but I do hope to see what you propose in Python 3.5, and
if there is a second edition, it will be a pleasure to explain `async`
and `await`!

I did have time to add a paragraph about PEP 492 in a Further reading
section, citing your name as the author.

Cheers,

Luciano


-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
|     http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg


More information about the Python-ideas mailing list