Skip to content

Instantly share code, notes, and snippets.

@pterk
Created June 3, 2013 17:24
Show Gist options
  • Save pterk/5699735 to your computer and use it in GitHub Desktop.
Save pterk/5699735 to your computer and use it in GitHub Desktop.
class A(object):
def __init__(self):
print self
def throw_bananas(self):
#super(A, self).throw_bananas()
print 'class A'
class B(object):
def __init__(self):
print self
def throw_bananas(self):
super(B, self).throw_bananas()
print 'class B'
class A2(A):
def __init__(self):
print self
def throw_bananas(self):
super(A2, self).throw_bananas()
print 'class A2'
class B2(B):
def __init__(self):
print self
def throw_bananas(self):
super(B2, self).throw_bananas()
print 'class B2'
class C(A2, B2):
def __init__(self):
print self
def throw_bananas(self):
super(C, self).throw_bananas()
print 'class C'
C().throw_bananas()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment