ungleich-learning-circle/youngjin.han/python-the-hard-way/ex44b.py

15 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()