format_time("{now}called three"class repeaterdef __init__(self)self count def repeater(selftimer)format_time("{now}repeat { }"self countself count + timer call_after( self repeatertimer timer(timer call_after( onetimer call_after( onetimer call_after( twotimer call_after( twotimer call_after( threetimer call_after( threerepeater repeater(timer call_after( repeater repeaterformat_time("{now}starting"timer run(this example allows us to see how multiple callbacks interact with the timer the first function is the format_time function it uses the string format method to add the current time to the messageand illustrates variable arguments in action the format_time method will accept any number of positional argumentsusing variable argument syntaxwhich are then forwarded as positional arguments to the string' format method after thiswe create three simple callback methods that simply output the current time and short message telling us which callback has been fired the repeater class demonstrates that methods can be used as callbacks toosince they are really just functions it also shows why the timer argument to the callback functions is usefulwe can add new timed event to the timer from inside presently running callback we then create timer and add several events to it that are called after different amounts of time finallywe start the timer runningthe output shows that events are run in the expected order : : starting : : called one : : called one : : called two : : called three : : called two : : repeat