Re: [Tutor] /not/ instanciating

2008-11-17 Thread Jerry Hill
On Sun, Nov 16, 2008 at 2:57 PM, spir <[EMAIL PROTECTED]> wrote: > * Why, then, is __init__ still executed when the instanciated object is > 'manually' returned? What's the use of that feature? The manual (http://www.python.org/doc/2.5.2/ref/customization.html) says: "If __new__() returns an insta

Re: [Tutor] /not/ instanciating

2008-11-16 Thread Alan Gauld
"spir" <[EMAIL PROTECTED]> wrote I have a type (say: T) which normally receives as main init argument an object that can be of any other type. Occasionally, this arg object may precisely be of type T. In this case, for several reasons, I wish not to "over-instanciate", rather that the constru

Re: [Tutor] /not/ instanciating

2008-11-16 Thread Kent Johnson
On Sun, Nov 16, 2008 at 2:57 PM, spir <[EMAIL PROTECTED]> wrote: > Hello, > > I have a type (say: T) which normally receives as main init argument an > object that can be of any other type. Occasionally, this arg object may > precisely be of type T. In this case, for several reasons, I wish not to

[Tutor] /not/ instanciating

2008-11-16 Thread spir
Hello, I have a type (say: T) which normally receives as main init argument an object that can be of any other type. Occasionally, this arg object may precisely be of type T. In this case, for several reasons, I wish not to "over-instanciate", rather that the constructor returns the source obj