Freeze and Resume execution

Miki Tebeka miki.tebeka at zoran.com
Sun May 23 06:16:20 EDT 2004


Hello All,

Thanks for all the input.

> >I'd like to use generators but can't see any "nice" way of doing it.
> 
> That would be the approach I would take.  What can't you see
> with using yield this way?
The output function is way down the call stack. The function that handles
the "freezing" and need to be saved is about 3-5 stack frames up
(depends on the scenario).

Propagating the output return value all the way back is tedious and
error prone. This is why I'd like to use raise/catch and not "if error
..."


Bye.
--
-------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
http://www.cs.bgu.ac.il/~tebeka
The only difference between children and adults is the price of the toys.




More information about the Python-list mailing list