On Dec 31, 2007, at 8:53 PM, bsnipes wrote:
> Where can I find info on the super() method? Does this call an a
> method in
> a base class?
It's a somewhat magical shortcut Paul cooked up for calling the
superclass behavior for a method. It's in dabo.lib.autosuper, and is
one of the mixin classes for dObject. So if your class is Foo, and
based on dabo.Bar, the following are all equivalent:
def method(self):
dabo.Bar.method(self)
def method(self):
super(dabo.Bar, self).method()
def method(self):
self.super()
I prefer the second form, since it and the last work better with
subclasses based on multiple inheritance, and the last form is just a
little too fragile-feeling for me. However, it does seem to work
well, so it's just a matter of taste.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]