[Zope] Strange problem calling a base classes method

Stefan Franke sfranke@cdc-group.com
Wed, 3 Mar 1999 14:01:07 +0100


While debugging a Product that inherits from OFS.Folder stumbled across
the following problem (copied from the debugger command line stopped
inside one of my Product's methods):

>>> self.__class__.__bases__[0].__bases__[3].__bases__[1]
<class OFS.CopySupport.CopySource at 8d11e0>

>>> isinstance (self, OFS.CopySupport.CopySource)
0

>>> (self.__class__.__bases__[0].__bases__[3].__bases__[1] 
     is OFS.CopySupport.CopySource)
1

The first line says self is an instance of OFS.CopySupport.CopySource,
the second says it's not. The class objects are identical.

My problem is that I'm not able to override one of 
OFS.CopySupport.CopySource's methods and to call the
base classes method from inside. At that point I get
a 
    TypeError: unbound method must be called with 
               class instance 1st argument

which usually occurs when calling an unbound method with
an instance of the wrong class.

I'm clueless..
Stefan