[Zope-dev] 'inheritedAttribute' vs. 'call of superclass'

Dieter Maurer dieter@handshake.de
Tue, 27 Feb 2001 22:19:19 +0100 (CET)


Gregor Heine writes:
 > I have two Python classes, say A and B, where B subclasses A.
 > If I want to call a method in A from an overridden method in B I can either
 > use:
 > 
 > B.inheritedAttribute('method_in_A')(self. *args)
 > or:
 > A.method_in_A (self, *args)
 > 
 > Can anybody explain me the differences between those two, because the second
 > one seems (at least in the context of Zope Products) not always to work
 > properly whereas the first one doesn't look very OO'ish and is (AFAIK) not a
 > Python function but something coming from Zope.
It is documented in the "ExtensionClass" documentation.

In my Zope installation (ZopeCVS), it is located in

  "lib/Components/ExtensionClass/doc/ExtensionClass.stx".

Until recently, it has been elsewhere.



Dieter