[Python-ideas] Yield-From: Finalization guarantees

Guido van Rossum guido at python.org
Fri Apr 3 05:25:10 CEST 2009

On Wed, Apr 1, 2009 at 2:30 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> As another perspective on this, I think Jacob's
> example is another case of bogus refactoring.

Be that as it may, I wonder if we shouldn't back off from the
refactoring use case a bit and instead just ponder the different types
of code you can write using generators. There's the traditional "pull"
style (iterators), "push" style (like the averaging example), and then
there are "tasks". (Have you read Dave Beazley's couroutines tutorial
yet? Or am I the only one who likes it? :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-ideas mailing list