testing oop stuff

This commit is contained in:
Evelyne 2023-04-20 13:56:46 +01:00
parent 166705c8c5
commit c7597f7cbb

16
OOP/main.py Normal file
View 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)