3 Apr
2009
3 Apr
'09
3:25 a.m.
On Wed, Apr 1, 2009 at 2:30 PM, Greg Ewing <greg.ewing@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/)