class Sup(object):

    def method1(self):
        print('This is method1 of the superclass')

    def method2(self):
        print('This is method2 of the superclass')

    def method3(self):
        print('This is method3 of the superclass')


class Sub(Sup):

    def method2(self):
        super(Sub, self).method2()
        print('that now is extended')

    def method3(self):
        print('This was method3 of superclass, but now is overriden')


parent = Sup()
child = Sub()

print('the next two lines show result of a method that is inherited by a child from its parents. The two lines are going to be identical.')
parent.method1()
child.method1()

print('')
print('the next three lines show the result of a method that is extended by a child.')
parent.method2()
child.method2()


print('')
print('the next two lines show the result of a method that has been overriden by a child. The second line is different than the first line.')
parent.method3()
child.method3()
