KraftDiner wrote:
> 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__()
                super(Rectangle, self).__init__()    # XXX fixed
>               self.type = Rectangle
>               print 'Rectangle'
> 
> class Square(Rectangle):
>       def __init__(self):
> #             super(self.__class__, self).__init__()
                super(Square, self).__init__()    # XXX fixed
>               self.type = Square
>               print 'Square'
> 
> r = Rectangle()
> s = Square()
> 


-- 
-Scott David Daniels
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to