Paul McNett wrote: > Carl Karsten wrote: >> johnf wrote: >>> Hi, >>> I think I'll start adding small stuff first >>> Please review and add to the question wiki. >>> >>> >>> What, why and how of "doDefault()" >>> >>> What is “doDefault()”? >>> Executes the parent class event or method of the same name from within a >>> subclass. >> does python use the term "event" ? if not, best not to introduce it. > > Correct: we are only talking methods here, not events. > > >> is doDefault() a dabo thing? I was under the impression it was python, but >> I am > > doDefault() is Dabo. self.super() is Dabo. What Python has is super(): > > class A(object): > def myMethod(self): > print "in A" > > class B(A): > def myMethod(self): > print "In B" > super(B, self).myMethod() > > B().myMethod() > In B > In A > > Notice how you need to explicity type the subclass ref, self, and the > method name you want to call. This is what Dabo's self.super() does for you: >
I wonder if it's a good idea to replace pythons super in dabo. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
