Re: classes and __init__ question

2010-05-17 Thread Ethan Furman
Alex Hall wrote: Hi all, I am a bit confused about classes. What do you pass a class, since all the actual information is passed to __init__? For example, say you have a dog class. The dog object has a name, a size, and a color. I believe you would say this: class dog(): def __init__(self, name

Re: classes and __init__ question

2010-05-17 Thread Patrick Maupin
On May 17, 3:55 pm, Alex Hall wrote: > So what is a subclass compared to a class? Are you saying that what is > passed to the class, so what is in the parentheses of the class, is > really the superclass? If so, what is the advantage of doing this; why > not just create a class that is not a sub?

Re: classes and __init__ question

2010-05-17 Thread Alex Hall
On 5/17/10, Patrick Maupin wrote: > On May 17, 3:19 pm, Alex Hall wrote: >> Hi all, >> I am a bit confused about classes. What do you pass a class, since all >> the actual information is passed to __init__? For example, say you >> have a dog class. The dog object has a name, a size, and a color.

Re: classes and __init__ question

2010-05-17 Thread Chris Rebert
On Mon, May 17, 2010 at 1:19 PM, Alex Hall wrote: > Hi all, > I am a bit confused about classes. What do you pass a class, since all > the actual information is passed to __init__? For example, say you > have a dog class. The dog object has a name, a size, and a color. I > believe you would say th

Re: classes and __init__ question

2010-05-17 Thread Patrick Maupin
On May 17, 3:19 pm, Alex Hall wrote: > Hi all, > I am a bit confused about classes. What do you pass a class, since all > the actual information is passed to __init__? For example, say you > have a dog class. The dog object has a name, a size, and a color. I > believe you would say this: > > class

classes and __init__ question

2010-05-17 Thread Alex Hall
Hi all, I am a bit confused about classes. What do you pass a class, since all the actual information is passed to __init__? For example, say you have a dog class. The dog object has a name, a size, and a color. I believe you would say this: class dog(): def __init__(self, name, size, color): s