No video

Demystifying Coroutines and Asynchronous Programming in Python

  Рет қаралды 4,725

FOSDEM

FOSDEM

Күн бұрын

by Mariano Anaya
At: FOSDEM 2019
video.fosdem.o...
In this talk we will explore how coroutines work and how they are implemented in Python. We will learn that generators lie at the heart of coroutines, and how this long-standing feature of Python evolved over time to support the new capabilities of asynchronous programming.
It’s a time travelling tale that explores the milestones in Python that relate to generators, coroutines, and asynchronous programming. The talk is intended to explore coroutines and asynchronous programming in Python, in full detail.
It provides a historical revision of all the milestones in Python that led to the current implementation of coroutines, asynchronous programming, and event loops (asyncio) as we know them today.
Starting from generators, it reviews their original idea and rationale, and then it explores how they became the pythonic solution for supporting coroutines, by extending their interface with new methods (PEP-342). Later on, generators (and coroutines) were extended once again in PEP-380, to support even more advanced functionality (like the "yield from" syntax). This was a major milestone that actually allowed programmers to start working with non-blocking I/O asynchronously fashion, and the idioms used for that resemble modern asynchronous programming with Python. Understanding what's behind those idioms helps to explain much of the current asynchronous frameworks.
The dynamic nature of Python made the syntax prone to mixing iterators with coroutines, so the community (wisely) agreed on the fact that the language had to evolve, and new syntax needed to be added. New specific types were added for coroutines in Python 3.5, and Python 3.6 incorporated asynchronous generators. Finally in Python 3.7, "async" and "await" were promoted to keywords, and there were several enhancements to the asyncio library, marking the current state of the art of asynchronous programming in Python.
The talk concludes by providing food for thought on what asynchronous programming actually means in Python, and what to expect for the future (Python 3.8 and beyond).
Room: UD2.120 (Chavanne)
Scheduled start: 2019-02-03 11:00:00+01

Пікірлер: 4
@davitkvaratskhelia4033
@davitkvaratskhelia4033 3 жыл бұрын
Finally, I understood co-routines functionalism. Thanks a lot!!!!
@rembautimes8808
@rembautimes8808 4 жыл бұрын
Thank you very good historical prespective
@IgorPadalko
@IgorPadalko 5 жыл бұрын
yield pronounces like /jiːld/, not to confuse it with GIL (Global Interpreter Lock)
@zakaria.morchid
@zakaria.morchid 3 жыл бұрын
this is a little funny but was a good talk
Mender - an open source OTA software update manager for IoT
49:52
"What is a Coroutine Anyway?" - John Reese (North Bay Python 2019)
30:27
North Bay Python
Рет қаралды 26 М.
Logo Matching Challenge with Alfredo Larin Family! 👍
00:36
BigSchool
Рет қаралды 9 МЛН
Harley Quinn's revenge plan!!!#Harley Quinn #joker
00:59
Harley Quinn with the Joker
Рет қаралды 5 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН
Python Asynchronous Programming - AsyncIO & Async/Await
25:57
Tech With Tim
Рет қаралды 422 М.
Next-Level Concurrent Programming In Python With Asyncio
19:19
ArjanCodes
Рет қаралды 172 М.
Async Generators in Python: A Deep Dive - Łukasz Langa - code::dive 2023
43:20
code::dive conference
Рет қаралды 1,8 М.
Understanding Python: Concurrent Coroutines
21:38
Jake Callahan
Рет қаралды 1,5 М.
Demystifying Python's Async and Await Keywords
1:18:53
JetBrains
Рет қаралды 98 М.
Lynn Root - Advanced asyncio: Solving Real-world Production Problems
40:02
EuroPython Conference
Рет қаралды 14 М.
AsyncIO, await, and async - Concurrency in Python
9:12
Socratica
Рет қаралды 89 М.
Intro to async Python | Writing a Web Crawler
14:23
mCoding
Рет қаралды 77 М.
A Really Gentle Introduction to Asyncio
30:32
PyCon AU
Рет қаралды 14 М.
Logo Matching Challenge with Alfredo Larin Family! 👍
00:36
BigSchool
Рет қаралды 9 МЛН