Skip to content

Instantly share code, notes, and snippets.

@johndoe46
Created December 6, 2011 15:47
Show Gist options
  • Save johndoe46/1438647 to your computer and use it in GitHub Desktop.
Save johndoe46/1438647 to your computer and use it in GitHub Desktop.
Python Multiple inheritance
class A(object):
def __init_(self):
self.test = "A"
class B(object):
def __init__(self):
self.test = "B"
class C(B,A):
def __init__(self):
super(C,self).__init__()
if __name__ == "__main__":
c = C()
print c.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment