> > I reinforce how the "while True" construct, with no opportunities > > for breaking out, might be an OK construct where *generators* > > are concerned. > > Or web servers! ;-) >
Yeah, very true. Daemons of all kinds are like infinite loops, connected to Windows TSRs and services in this article: http://en.wikipedia.org/wiki/Daemon_(computer_software) > (Then again, it's always useful to think of having the possibility of > ending a program gracefully, rather than having to use the power off > button...) > > André What's cool about a generator is it stops execution at the yield, so there's no penalty for not writing exit code. A generator gets garbage collected just like any other object, without needing to be explicitly halted or paused. Kirby _______________________________________________ Edu-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/edu-sig
