[Tutor] python varying mulitple inheritance
kendy at kendy.org
kendy at kendy.org
Tue Jun 19 17:01:17 CEST 2012
Thank you Steve and Alan!
I'll keep studying and practicing.
Ken
>Back to basics. a class is a definition of a *type* of thing, not a
>particular case. A Pocket is a general purpose container. Each instance
>can hold many things. So you would normally expect one pocket class and
>6 instances. Each instance holding a different list of items.
>
>The only time you need a different Pocket class is where the pocket has
>different *behaviour*. It is normally the behaviours that differentiate
>classes not the data. The class data is there to support the class
>behaviour. The behaviour of a Pocket is probably some thing like:
>addItem
>removeItem
>findItem
>countItems
>open
>close
>empty
>
>In most implementations a Pocket will look a lot like a list...
More information about the Tutor
mailing list