17 lines
313 B
Python
17 lines
313 B
Python
|
class SuperClass1:
|
||
|
def __init__(self):
|
||
|
self.foo = "bar"
|
||
|
|
||
|
class SuperClass2:
|
||
|
def __init__(self):
|
||
|
self.bar = "foo"
|
||
|
|
||
|
class DerivedClass(SuperClass1, SuperClass2):
|
||
|
def __init__(self):
|
||
|
|
||
|
SuperClass2.__init__(self)
|
||
|
|
||
|
myDerived = DerivedClass()
|
||
|
print(myDerived.bar)
|
||
|
print(myDerived.foo)
|