[Zope] inheritance in python product
06 Jun 2002 11:59:45 -0400
See the description of "inheritedAttribute" in this document:
Almost all Zope objects are extension classes and they play by slightly
different rules than vanilla Python classes.
On Thu, 2002-06-06 at 11:53, Sylvain Th=E9nault wrote:
> 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 ?
> Sylvain Th=E9nault=20
> Zope maillist - Zope@zope.org
> ** No cross posts or HTML encoding! **
> (Related lists -=20
> http://lists.zope.org/mailman/listinfo/zope-dev )