Message146180
I ended up implementing my own sched.py equivalent as I needed kwargs support. This is my attempt to improve the stdlib, so I can throw my module way ;-)
Added kwargs support, and made "argument" optional. "argument" is still named argument, I would like to rename this args but I'm unclear on the backwards compat rules for stdlib, in theory it should be fine unless someone has code that treats argument as a keyword arg).
The scheduler init no long requires timer functions to be provided, it defaults to time.time, time.sleep as a helper to reduce repeated code for callers. This still allows callers to provide custom timer routines.
I added a few (non exhaustive) tests for the new additions.
It looks like there are a few pep8 improvements could be made to sched.py but I've not done that to reduce diffs and make it easier to see what I changed. Similar doc strings could be made more clear.
I snuck in a hack to the test so that the full test suite isn't needed, I do not expect that to be accepted :-) I don't have enough network bandwidth to pull the whole hg repo so I ended up pulling the tip version for 2.7 of sched and its test (as of 2011-10-22 this is 5110d723fbb1) |
|
Date |
User |
Action |
Args |
2011-10-22 19:05:56 | clach04 | set | recipients:
+ clach04 |
2011-10-22 19:05:54 | clach04 | set | messageid: <1319310354.56.0.392534213439.issue13245@psf.upfronthosting.co.za> |
2011-10-22 19:05:53 | clach04 | link | issue13245 messages |
2011-10-22 19:05:53 | clach04 | create | |
|