Question about Timeline code

Is there any efficient way to execute every timeline-based function.

For example in these code

def exit_game(self):
taskMgr.doMethodLater(3, self.exit_game)

I prefer that it can be something like this
[color=darkblue]taskMgr.doMethodLater(3, sys.exit)

Sequence is the best way of doing action in a threaded way. I need it for executing command, but it seems that it can only be done by creating Func()

For example:

def hit1(self):
def hit2(self):
Sequence(Func('hit1'), Wait(.2), Func('hit2')).start()

and i really prefer that it would be something like this
[color=darkblue]Sequence(self.hit=3, Wait(.2), self.hit=10;self.hit_end=True;).start()

I often get dizzy of my own code when they are too many function defined for only one similar purpose. I better create 1 line of code rather than 3 lines of code for the same purpose. Thus when you gonna modify or delete it, you only need to search for the line, not the 3 line of function that can be scattered everywhere in your script.

I hope you got what i mean :confused:
I need to rearrange my code before it gets too much useless script, then i get too lazy to alter it, and then it become totally useless to create a sequel for that :unamused:


Func() accepts a function and any number of arguments, so it’s Func(setattr, self, ‘hit’, 3)

greats gotta try it immediately.
not as i expected, but better.

Thanks ynjh_jo