Re: When ‘super’ is not a good idea

2009-10-07 Thread alex23
Jean-Michel Pichavant wrote: > alex23 wrote: > > To me, the explicit reference to the base class violates DRY. It also > > means you need to manually change all such references should the base > > class ever change, something that using super() avoids. > > I found the correct answer > (http://www.

Re: When ‘super’ is not a good idea

2009-10-07 Thread Scott David Daniels
Ben Finney wrote: Scott David Daniels wrote: ... class Initialized(ClassBase): @classmethod def _init_class(class_): class_.a, class_.b = 1, 2 super(Initialized, class_)._init_class() Mea culpa: Here super is _not_ a good idea, […] Why is ‘super’

Re: When ‘super’ is not a good idea

2009-10-07 Thread alex23
Jean-Michel Pichavant wrote: > a possible answer: > - explicit >> implicit > > I'm not sure this is the correct one though :) To me, the explicit reference to the base class violates DRY. It also means you need to manually change all such references should the base class ever change, something th

Re: When ‘super’ is not a good idea

2009-10-07 Thread Jean-Michel Pichavant
Ben Finney wrote: Scott David Daniels writes: Scott David Daniels wrote: class Initialized(ClassBase): @classmethod def _init_class(class_): class_.a, class_.b = 1, 2 super(Initialized, class_)._init_class() Mea culpa: Here super is