Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Application(object):
- def __init__(self):
- print('-> init application')
- self.do_init()
- print('<- init application')
- def do_init(self):
- print('1. app')
- class SecondApp(Application):
- def do_init(self):
- print('-> 2. SecondApp')
- super().do_init()
- print('<- 2. SecondApp')
- class ThirdApp(Application):
- def do_init(self):
- print('-> 3. ThirdApp')
- super().do_init()
- print('<- 3. ThirdApp')
- class FourApp(ThirdApp):
- def do_init(self):
- print('-> 4. FourApp')
- super().do_init()
- print('<- 4. FourApp')
- class FiveApp(ThirdApp):
- def do_init(self):
- print('-> 5. FiveApp')
- super().do_init()
- print('<- 5. FiveApp')
- class FinApp(SecondApp, FourApp, FiveApp):
- def do_init(self):
- print('-> FinApp')
- super().do_init()
- print('<- FinApp')
- testing = FinApp()
Advertisement
Add Comment
Please, Sign In to add comment