Yeah... ptmcg's response is definitely going overboard. Not to mention, most likely not even applicable under these circumstances
If it were wxWidgets, it would be as simple as this:
class MyFrame(wxFrame):
...
def _event_okay(self, event=None):
# processes task for okay button
if event != None:
event.skip()
def _event_quit(self, event=None):
# processes task for quit button
if event != None:
event.skip()
def _event_other_button(self, event):
# processes two tasks sequentially
self._event_okay()
self._event_quit()
event.skip()
...
Unless I grossely misunderstand the concern?
...