[Zope] inheritance in python product
Chris McDonough
chrism@zope.com
06 Jun 2002 11:59:45 -0400
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=E9nault wrote:
> hello,=20
>=20
> 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:
>=20
> ZNodeImpl.__init__(self, id, title)
> TypeError: unbound method __init__() must be called with instance as
> first argument
>=20
> this sounds like my class doesn't inherit from ZNodeImpl but it does !!
> If I remove the zope base class, everything works correctly...
>=20
> it seems to have some python black magic here. Anybody can explain this
> to me or give some pointers ?
>=20
> TIA
>=20
> --=20
> Sylvain Th=E9nault=20
>=20
>=20
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -=20
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )