On Thu, 28 Dec 2006 11:14:27 +0100, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>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 now we're rolling ! :-) thnx both. -- http://mail.python.org/mailman/listinfo/python-list