Главная
Study mode:
on
1
Intro
2
The dumbest function in the world
3
Bytecode from our function
4
What about this function?
5
What's the difference?
6
Bytecodes
7
What's a generator?
8
How does a "for" loop work
9
What about with our generator?
10
Doing it manually
11
"next" and generators
12
fib
13
Generator example 2: read_n
14
next_vowel
15
So, when do we use generators?
16
"yield" as an expression
17
The "send" method
18
Walrus yield
19
How can I use coroutines?
20
Coroutine as "nanoservices"
21
Example: MD5
22
Coroutine example 1: MD5
23
Coroutine example 2: Weather
24
Coroutine example 2.1: Weather
25
Coroutine example 3
26
Ending early
27
Revisiting the weather
28
Megaservices
29
Refactoring our generator
30
"yield from" to the rescue!
31
What about asyncio?
32
Should you use coroutines?
Description:
Explore the advanced features of Python generators, coroutines, and nanoservices in this EuroPython 2021 conference talk. Delve into the lesser-known aspects of generators, including the "send" method and "yield from" syntax. Learn how to conceptualize coroutines as in-process nanoservices and determine their appropriate use cases. Discover generator function basics, the differences between next and send, coroutine construction techniques, and the implementation of sub-coroutines. Gain insights into practical applications of these concepts through examples such as MD5 hashing and weather data processing. Understand the relationship between coroutines and asyncio, and develop criteria for deciding when to incorporate coroutines in your Python projects.

Generators, Coroutines, and Nanoservices

EuroPython Conference
Add to list