We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Generators, coroutines, and nanoservices

Formal Metadata

Title
Generators, coroutines, and nanoservices
Title of Series
Number of Parts
115
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Generator functions have been a part of Python for many years already, and are a well known technique for creating iterators. But generators have a few lesser-known aspects, including their “send” method and the “yield from” syntax. Many Python developers shy away from using them, unsure of what they would do, or how they would be useful — seeing coroutines as a solution looking for a problem. In this talk, I’ll tell you why coroutines can be useful, and how thinking about them as in-process “nanoservices” puts us in the right frame of mind to determine when they would and wouldn’t be appropriate. Among the topics we’ll explore are: Generator function basics next vs. send How to build a coroutine Thinking of coroutines as nanoservices Sub-coroutines The need for yield from Using yield from Ideas for general usage