Jason Tackaberry wrote:
> On 2007-10-25 08:55, Hans Meine wrote:
>> I also prefer kwargs. However, I wondered about your double (()), and

I wonder too, wanted to make it a tuple, so a single argument, forgot
about the kwargs when I wrote it.

>> I agree
>> with Jason that a single timer per object simplifies things.
> 
> I dislike the differentiation between, as in Duncan's example, min and
> mins kwarg.  I'm never going to remember what's what.
> 
> The idea was mins allows an interval, whereas min was a fixed time.  An
> interval is just a shorthand way of specifying a list of possible values
> for min.  So how about we just let the kwargs accept sequences or range
> objects.
> 
>   t.schedule(min = 0) # on the hour every hour
>   t.schedule(min = range(0, 60, 5)) # every 5 minutes
>   t.schedule(hour = [0, 12], min = 30) # at half past midnight and noon
> 
> Calling it AtTimer would be fine with me.

So
| t.schedule(sec = 45)
would run every minute at 45 seconds and
| t.schedule(min = range(1, 60, 2), sec = 30)
would run at *:01:30, *:03:30, *:05:30, ...

I like it really simple.

Duncan




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to