At 5:07 PM -0700 7/3/02, Peter Scott wrote:
>At 01:54 PM 7/3/02 -0600, Thom Boyer wrote:
>>I'm personally MUCH more interested in
>>Python's generators
>><http://www.python.org/peps/pep-0255.html>.
>>
>>A generator is like an iterator in that it can produce a series of values.
>>But unlike
>>iterators, when you ask a generator for the next value, it picks up
>>execution exactly where
>>it left off when it returned the last value -- including all it's stack.
>
>Isn't that a coroutine?


A simple form of it, yep. IIRC you can't yield out from inside a 
block, but I could be wrong there. (They do interesting things with 
Duff's Device for them)
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to