April 2019
Intermediate to advanced
646 pages
16h 48m
English
The asyncio module appeared in Python 3.4, so it is the only version of Python that has serious support for asynchronous programming that is older than Python 3.5. Unfortunately, it seems that these two subsequent versions are just enough to introduce compatibility concerns.
Like it or not, the core of asynchronous programming in Python was introduced earlier than syntax elements supporting this pattern. Better late than never, but this created a situation where there are two syntaxes available for working with coroutines.
Starting from Python 3.5, you can use async and await as follows:
async def main():
await asyncio.sleep(0)
But for Python 3.4, you need to use the asyncio.coroutine decorator and the ...