Inheritance#

Consider the following definitions.

class A(object):
    def __init__(self):
        self.v = None

    def set(self, v):
        self.v = v

    def get(self):
        return self.v

class B(A):
    def __init__(self):
        self.v = 42

class C(A):
    def __init__(self):
        print('building a C')

    def set(self, v):
        self.v = v * v