I would prefer the first solution for one simple reason:
What if you want in the Child
class to override just the on_start_main
and leave the on_end_main
unchanged.
If you choose the first solution, then you just override the on_start_main
method and your done. You don't have to know or even care what the Parent
class does in it's on_end_main
.
If you choose the second solution you have to know exactly what the Parent
class exactly does in the main
method, so not only you have to dig into the source of the Parent
class but also duplicate the code already written.