ANN: Kamaelia 0.2.0 released!

Michael Sparks michaels at rd.bbc.co.uk
Thu Aug 4 11:47:48 EDT 2005


Terry Reedy wrote:
> "Michael Sparks" <ms at cerenity.org> wrote in message
> news:42f14e42$0$3493$ed2619ec at ptn-nntp-reader03.plus.net...

>> def updater(interval, message):
>>   t = time.time():
>>   while 1:
>>      if time.time() - t > interval:
>>         print message
> 
>            yield None # add this ????


Yes. (I can't believe I missed that out! :) I'd normally use yield 1,
but that's force of habit. I tend to use a true value to indicate a
never ending generator - partly because we use a false value to
indicate clean shutdown of a component to our scheduler.

Thanks :)


Michael
-- 
Michael.Sparks at rd.bbc.co.uk, http://kamaelia.sourceforge.net/
British Broadcasting Corporation, Research and Development
Kingswood Warren, Surrey KT20 6NP

This message (and any attachments) may contain personal views
which are not the views of the BBC unless specifically stated.




More information about the Python-list mailing list