class Red(object):

    def x(self):
        print('#F00')


class Blue(object):

    def x(self):
        print('#00F')


class Shape(object):

    def __init__(self, color):
        self._color = color

def x(self):
    return self._color.x()


class Circle(Shape):

    def __init__(self, color):
        Shape.__init__(self, color)
self.x()


class Square(Shape):

    def __init__(self, color):
        Shape.__init__(self, color)
self.x()
self.sides = 4
red_circle = Circle(color=Red())
blue_circle = Circle(color=Blue())
blue_square = Square(color=Blue())
Установить суперкласс объекта в __init__?