Proper way to return an instance of a class from a class method ?

2010-03-05 Thread Auré Gourrier
Dear all, I have what will probably sound as stupid questions for experienced Python users... which I am not, hence my seeking for some help. QUESTION 1: I've implemeted a class which defines a container with 2 lists of data (with some specific format). Some of the methods simply

Re: Proper way to return an instance of a class from a class method ?

2010-03-05 Thread Chris Rebert
On Fri, Mar 5, 2010 at 2:35 AM, Auré Gourrier aurelien.gourr...@yahoo.fr wrote: snip QUESTION 2: If I go this way, I have a second problem: if I create a new class which inherits from the previous, I would expect/like the methods from the initial class to return instances from the new class: