Sorry, kind of new to the idea of using simple generators in place of
regular functions, but I think I have the classic "need to save intermediate
state" case which would make it worthwhile. The current function-based
approach I'm using is pretty cumbersome. Suppose g is a simple generator:
def g():
while True:
do_something_useful()
yield True
Does it make sense to call it like this?
gobject.idle_add(g)
If I want to terminate the idle execution I suppose I'd have to arrange to
yield False instead of True, just as with a regular function, yes?
Thx,
--
Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
"There's a fine line between a hobby and a mental illness." Ande Rasmussen
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/