In <[EMAIL PROTECTED]>, Osiris wrote:

> Would I put all the stuff that is the same in both classes in the base
> class and only the differing stuff in the subclasses ?

Yes that's the intent of base/sub class relationships.  Baseclasses
contain the behavior common to all their subclasses and subclasses
implement just the different or additional behavior.

> Could I move the normal length method to the superclass, and override
> it in the special class,  like this:

Yes that can be done and makes perfectly sense if the `length()` in the
baseclass is the "normal" behavior and that baseclass can be instantiated
and used directly.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to