python's OOP question

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Oct 18 06:39:25 EDT 2006


"neoedmund" <neoedmund at gmail.com> writes:

> Bruno Desthuilliers wrote:
> > neoedmund wrote:
> > > in real life, a class is not defined so well that any method is
> > > needed by sub-class.
> >
> > Then perhaps is it time to refactor. A class should be a highly
> > cohesive unit. If you find yourself needing only a specific subset
> > of a class, it may be time to extract this subset in it's own
> > class.
>
> I donnot agree with your "it's time to refactory" very much, man has
> probly never has time to do such things.

I respectfully suggest that the *reason* you find yourself with little
time to refactor is probably related to the fact that you *need* to
refactor. If your code is crufty and poorly-designed, it is costing
you every time you need to maintain it.

Would it help if we called it "preventative maintenance"?

-- 
 \        "I bought a dog the other day. I named him Stay. It's fun to |
  `\     call him. 'Come here, Stay! Come here, Stay!' He went insane. |
_o__)      Now he just ignores me and keeps typing."  -- Steven Wright |
Ben Finney




More information about the Python-list mailing list