socek

Untitled

May 4th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. class Application(object):
  2.  
  3.     def __init__(self):
  4.         print('init application')
  5.         self.do_init()
  6.  
  7.     def do_init(self):
  8.         print('1. app')
  9.  
  10.  
  11. class SecondApp(Application):
  12.  
  13.     def do_init(self):
  14.         super().do_init()
  15.         print('2. SecondApp')
  16.  
  17.  
  18. class ThirdApp(Application):
  19.  
  20.     def do_init(self):
  21.         super().do_init()
  22.         print('3. ThirdApp')
  23.  
  24.  
  25. class FourApp(ThirdApp):
  26.  
  27.     def do_init(self):
  28.         super().do_init()
  29.         print('4. FourApp')
  30.  
  31.  
  32. class FiveApp(ThirdApp):
  33.  
  34.     def do_init(self):
  35.         super().do_init()
  36.         print('5. FiveApp')
  37.  
  38.  
  39. class FinApp(SecondApp, FourApp, FiveApp):
  40.  
  41.     def do_init(self):
  42.         super().do_init()
  43.         print('FinApp')
  44.  
  45. testing = FinApp()
Advertisement
Add Comment
Please, Sign In to add comment