testing oop stuff
This commit is contained in:
parent
166705c8c5
commit
c7597f7cbb
16
OOP/main.py
Normal file
16
OOP/main.py
Normal file
@ -0,0 +1,16 @@
|
||||
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)
|
Loading…
Reference in New Issue
Block a user