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
"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
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
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