Advertisement
socek

Untitled

Jul 8th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. class One(object):
  2.  
  3.     def me(self):
  4.         print('One')
  5.  
  6.  
  7. class Two(One):
  8.  
  9.     def me(self):
  10.         print('Two')
  11.         super().me()
  12.  
  13.  
  14. class Three(One):
  15.  
  16.     def me(self):
  17.         print('Three')
  18.         super().me()
  19.  
  20.  
  21. class Four(Two, Three):
  22.  
  23.     def me(self):
  24.         print('Four')
  25.         super().me()
  26.  
  27.  
  28. class Five(Three, Two):
  29.  
  30.     def me(self):
  31.         print('Five')
  32.         super().me()
  33.  
  34. Four().me()
  35. print('')
  36. Five().me()
  37.  
  38. ---------------------------------------------------
  39. Four
  40. Two
  41. Three
  42. One
  43.  
  44. Five
  45. Three
  46. Two
  47. One
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement