Use of iterators for state machine (was Re: 2.2 features)
Peter Hansen
peter at engcorp.com
Thu Jul 26 08:29:42 EDT 2001
Tim Peters wrote:
>
> [Peter Hansen]
[on iterators]
> > I'm especially looking forward to using them to implement state machines.
>
> Have you read PEP 255 ("Simple Generators")? There's a long section at the
> start discussing exactly that. [...]
Clearly I had not :-). I shall. Thanks for the background.
> If you don't think about it too much <wink>, it all works the way you
> expect; if you do think about it too much, it takes an "aha!" (or maybe even
> two) to figure out *why* it all works. It took me about 8 years to explain
> it to Guido <wink> -- although, in his defense, he may wish to protest that
> the first time he actually paid attention to what I was screaming at him, he
> "got it" in about one minute flat.
Thanks for leaving me an "out": I'll let you know when *I* actually
start paying attention, since I don't entirely get it just yet. ;-)
--
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com
More information about the Python-list
mailing list