fork download
  1. class First(object):
  2. def __init__(self):
  3. print "first"
  4.  
  5. class Second(First):
  6. def __init__(self):
  7. print "second"
  8.  
  9. class Third(First):
  10. def __init__(self):
  11. print "third"
  12.  
  13. class Fourth(Second, Third):
  14. def __init__(self):
  15. super(Fourth, self).__init__()
  16. print "that's it"
  17.  
  18. print "First: "
  19. print Fourth.__mro__
  20.  
  21. class First(object):
  22. def __init__(self):
  23. print "first"
  24.  
  25. class Second(object):
  26. def __init__(self):
  27. print "second"
  28.  
  29. class Third(First):
  30. def __init__(self):
  31. print "third"
  32.  
  33. class Fourth(Third, Second):
  34. def __init__(self):
  35. super(Fourth, self).__init__()
  36. print "that's it"
  37. print "Second:"
  38. print Fourth.__mro__
Success #stdin #stdout 0.08s 8632KB
stdin
Standard input is empty
stdout
First: 
(<class '__main__.Fourth'>, <class '__main__.Second'>, <class '__main__.Third'>, <class '__main__.First'>, <type 'object'>)
Second:
(<class '__main__.Fourth'>, <class '__main__.Third'>, <class '__main__.First'>, <class '__main__.Second'>, <type 'object'>)