Exploring generators and coroutines

Date
Type
Talk
Language
English
Length
40 minutes

About this talk

Starting from a first introduction to generators, the talk will first cover the basics of them, their syntax, the original design of generators in Python, and all the kind of possibilities they offer in order to improve the performance, and run computations more efficiently. The talk will cover all methods that entail the generator protocol, and the different possibilities they enable from a user perspective. After reviewing the milestones on generators (from PEP-255 introducing generators, PEP-342 adding support for coroutines, PEP-380 allowing to delegate iteration to sub-generators, and more), we will see how coroutines serve asynchronous programming.