Hi, I have a diamond-shaped multiple inheritanc chain with new style classes, but super() does not call the parent class correctly:
-- snip -- from qtcanvas import * class B2(QCanvasItem): def move(self, x,y): super(B2, self).move(0,0) print "B2" class C2(QCanvasItem): def move(self, x,y): super(C2, self).move(0,0) print "C2" class D2(QCanvasPolygonalItem, B2, C2): def move(self, x,y): super(D2, self).move(0,0) print "D2" d2 = D2(None) d2.move(0,0) -- snip -- returns: Traceback (most recent call last): File "tmp.py", line 46, in ? d2.move(0,0) File "tmp.py", line 42, in move super(D2, self).move(0,0) File "tmp.py", line 32, in move super(B2, self).move(0,0) File "tmp.py", line 37, in move super(C2, self).move(0,0) AttributeError: 'super' object has no attribute 'move' super(C2, self).move(0,0) should resolve to QCanvasItem.move AFAIK super only works with new-style classes, so I checked: >>> from qtcanvas import * >>> isinstance(QCanvasItem, object) True A way to fix this is to introduce a dummy class A2(QCanvasItem): def move(self,x,y): QCanvasItem.move(self,x,y) This is stupid, as it only delays execution by one intermediary call. Is this a bug? Thanks, Ciao Uwe -- http://mail.python.org/mailman/listinfo/python-list