[Python-Dev] yeah! for Jeremy and Greg
Jeremy Hylton
jeremy@cnri.reston.va.us
Tue, 28 Mar 2000 21:59:26 -0500 (EST)
>>>>> "DA" == David Ascher <DavidA@ActiveState.com> writes:
DA> But most importantly, IMO:
DA> class SubClass(Class):
DA> def __init__(self, a, *args, **kw):
DA> self.a = a
DA> Class.__init__(self, *args, **kw)
DA> Much neater.
This version of method overloading was what I liked most about Greg's
patch. Note that I also prefer:
class SubClass(Class):
super_init = Class.__init__
def __init__(self, a, *args, **kw):
self.a = a
self.super_init(*args, **kw)
I've been happy to have all the overridden methods explicitly labelled
at the top of a class lately. It is much easier to change the class
hierarchy later.
Jeremy