Asynchronous I/O frameworks like Node, Twisted, Tornado, and Python 3.4’s new “asyncio” can efficiently scale past tens of thousands of concurrent connections. But async coding with callbacks is painful and error-prone. Programmers increasingly use coroutines in place of callbacks to get the best of both worlds: efficiency plus a natural and robust coding style. I’ll explain how asyncio’s coroutines work. They are built using Python generators, the “yield from” statement, and the Future and Task classes. You will gain a deep understanding of this miraculous new programming idiom in the Python standard library.