Calling a generator multiple times

Just van Rossum just at letterror.com
Fri Dec 7 13:04:30 EST 2001


Courageous wrote:
> 
> >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.
> 
> I don't have any personal problem with understanding them;
> I've worked extensively with stackless prior to this. There's
> no problem.

I didn't mean generators _in general_, but the "simple generators"
as they are implemented in Python 2.2 _specifically_.

> What I have a problem with is the inconsistency between the
> apparent definition and the result. Not even continuations
> behave this way.

Read the arguments for and against the current implementation
in the python-iterators list archives. It's really not as bad
as you say. A brain-reset might help...

Just



More information about the Python-list mailing list