Created
December 6, 2011 15:47
-
-
Save johndoe46/1438647 to your computer and use it in GitHub Desktop.
Python Multiple inheritance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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