Calling a generator multiple times

Just van Rossum just at letterror.com
Fri Dec 7 12:39:22 EST 2001


Courageous wrote:

> I don't think that's necessarily a bad thing, but what I feel
> firmly about is that the current semantics versus syntax of
> generators in python is obviously wrong.
> 
> Just about anything would be better, up to and including the
> use of additional keywords. I simply feel strongly that as
> long as a generator masquerades as a method, it ought to
> behave like one, and that should be its default behavior.

You really need to dig into the python-iterators list archives.
This has been discussed over and over and over. It's really
not as bad as you think. You need to reset your brain, play
with generators a bit more. It becomes really natural after
a while.

Just



More information about the Python-list mailing list