16 lines
224 B
Python
16 lines
224 B
Python
|
class Parent(object):
|
||
|
|
||
|
def override(self):
|
||
|
print("PARENT override()")
|
||
|
|
||
|
class Child(Parent):
|
||
|
|
||
|
def override(self):
|
||
|
print("CHILD override()")
|
||
|
|
||
|
dad = Parent()
|
||
|
son = Child()
|
||
|
|
||
|
dad.override()
|
||
|
son.override()
|