3 ms·
(Minor nit: the yield-based functions are generator functions, not iterators.) This approach was also described by David Beazley at PyCon, the slides are avail
by nuxi 14y ago
(Minor nit: the yield-based functions are generator functions, not iterators.)
This approach was also described by David Beazley at PyCon, the slides are available at http://www.dabeaz.com/generators/Generators.pdf http://www.dabeaz.com/generators/Generators.pdf. He extends this approach to generator
multiplexing, coroutines etc., along with useful examples. An excellent read.