OOP / language design question

bruno at modulix onurb at xiludom.gro
Tue Apr 25 07:52:56 EDT 2006


Duncan Booth wrote:
(snip)
> Usually though, if a subclass doesn't immediately call the base class 
> constructors as the first thing it does in __init__ it indicates poor code 
> and should be refactored.

Not necessarily. It's a common case to have some computations to do/some
attributes to set in the derived class's __init__ before calling the
superclass's.

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list