Hi Sylvain, See the description of "inheritedAttribute" in this document: http://debian.acm.ndsu.nodak.edu/doc/python-extclass/ExtensionClass.html Almost all Zope objects are extension classes and they play by slightly different rules than vanilla Python classes. - C On Thu, 2002-06-06 at 11:53, Sylvain Thénault wrote:
hello,
I've a problem to have a class which inherits from zope base classes (Role.RoleManager, Acquisition.Implicit, ObjectManager.ObjectManager and Persistent) and classes from another package. As soon as a class inherits from one of the zope base class, I get an exception when I try to instantiate an object of this class. This exception is raised when I try to call the ancestor constructor:
ZNodeImpl.__init__(self, id, title) TypeError: unbound method __init__() must be called with instance as first argument
this sounds like my class doesn't inherit from ZNodeImpl but it does !! If I remove the zope base class, everything works correctly...
it seems to have some python black magic here. Anybody can explain this to me or give some pointers ?
TIA
-- Sylvain Thénault
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )