Re: [Tutor] python varying mulitple inheritance

2012-06-19 Thread kendy
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

Re: [Tutor] python varying mulitple inheritance

2012-06-19 Thread Alan Gauld
On 19/06/12 06:14, ke...@kendy.org wrote: Hmmm. No need to write the whole thing written out. Just how not to code: class Pocket1(Wallet, Keys, Comb, Usb, CellPhone, WorkBadge): class Pocket2(Wallet, Keys, Comb, Usb, CellPhone): class Pocket3(Wallet, Keys, Comb, Usb,WorkBadge): class

Re: [Tutor] python varying mulitple inheritance

2012-06-18 Thread kendy
Hmmm. No need to write the whole thing written out. Just how not to code: class Pocket1(Wallet, Keys, Comb, Usb, CellPhone, WorkBadge): class Pocket2(Wallet, Keys, Comb, Usb, CellPhone): class Pocket3(Wallet, Keys, Comb, Usb,WorkBadge): class Pocket4(Wallet, Keys, Comb, Usb): class Poc

Re: [Tutor] python varying mulitple inheritance

2012-06-18 Thread kendy
Thank you Steve, for the pointing me in a smarter direction! My immediate homework is: - Practice consistent conventions for naming things -- pep-0008. - Learn composition/has-a. I thought of a better way to think of my problem. A list element would contain the things that Bob has in his pockets

Re: [Tutor] python varying mulitple inheritance

2012-06-17 Thread Steven D'Aprano
ke...@kendy.org wrote: Hello I'm new to classes. And I hope the my question isn't too big. I have electronic test equipment, but thought that a boat example would be easier. Can you help me untangle my class design? My problem is basically multiple inheritance, but I want to be flexible for how

[Tutor] python varying mulitple inheritance

2012-06-17 Thread kendy
Hello I'm new to classes. And I hope the my question isn't too big. I have electronic test equipment, but thought that a boat example would be easier. Can you help me untangle my class design? My problem is basically multiple inheritance, but I want to be flexible for how many will inherit. I'll