Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

superstuff

By: a guest on Jul 9th, 2012  |  syntax: None  |  size: 0.58 KB  |  hits: 66  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. class First(object):
  2.     def __init__(self):
  3.         print "first prologue"
  4.         super(First, self).__init__()
  5.         print "first epilogue"
  6.  
  7. class Second(First):
  8.     def __init__(self):
  9.         print "second prologue"
  10.         super(Second, self).__init__()
  11.         print "second epilogue"
  12.  
  13. class Third(First):
  14.     def __init__(self):
  15.         print "third prologue"
  16.         super(Third, self).__init__()
  17.         print "third epilogue"
  18.  
  19. class Fourth(Second, Third):
  20.     def __init__(self):
  21.         super(Fourth, self).__init__()
  22.         print "that's it"
  23.  
  24. Fourth()