So ok I've written a piece of code that demonstrates the problem.
Can you suggest how I change the Square class init?

class Shape(object):
        def __init__(self):
                print 'MyBaseClass __init__'

class Rectangle(Shape):
        def __init__(self):
                super(self.__class__, self).__init__()
                self.type = Rectangle
                print 'Rectangle'

class Square(Rectangle):
        def __init__(self):
                super(self.__class__, self).__init__()
                self.type = Square
                print 'Square'

r = Rectangle()
s = Square()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to