Re: calling subclass constructor question

2005-06-19 Thread Steven Bethard
In Han Kang wrote: > So each of the sub classes plots a different type of graph. The > superclass defines methods that are the same for all the plots. I want > to be able to pick some points and be able to generate a more plots. > What I was wondering if I could define in a method in the supe

Re: calling subclass constructor question

2005-06-19 Thread D H
In Han Kang wrote: > So each of the sub classes plots a different type of graph. The > superclass defines methods that are the same for all the plots. I want > to be able to pick some points and be able to generate a more plots. > What I was wondering if I could define in a method in the supe

calling subclass constructor question

2005-06-19 Thread In Han Kang
So each of the sub classes plots a different type of graph. The superclass defines methods that are the same for all the plots. I want to be able to pick some points and be able to generate a more plots. What I was wondering if I could define in a method in the superclass of an object the ab

Re: calling subclass constructor question

2005-06-19 Thread Steven Bethard
In Han Kang wrote: > Anyway, I was wondering...I have an super class which is the superclass > for 5 other classes. However, I want to be able to call the subclass > constructors from the super class. Is this possible? Are you trying to use your superclass as a factory? If so, one option is s

Re: calling subclass constructor question

2005-06-19 Thread [EMAIL PROTECTED]
No. You will go into an infinite loop - at least I get there when I try someting like this: class Base: def __init__(self): Derived.__init__(self) print 'Base' class Derived(Base): def __init__(self): Base.__init__(self)

Re: calling subclass constructor question

2005-06-19 Thread Diez B. Roggisch
In Han Kang wrote: > Hello everyone and thank you for being such a good community. > > Anyway, I was wondering...I have an super class which is the superclass > for 5 other classes. However, I want to be able to call the subclass > constructors from the super class. Is this possible? If you h

calling subclass constructor question

2005-06-19 Thread In Han Kang
Hello everyone and thank you for being such a good community. Anyway, I was wondering...I have an super class which is the superclass for 5 other classes. However, I want to be able to call the subclass constructors from the super class. Is this possible? Thank you in advance -- http://mail.