[Python-Dev] Design question: call __del__ only after successful __init__?

Greg Stein gstein@lyra.org
Thu, 2 Mar 2000 09:14:35 -0800 (PST)


On Thu, 2 Mar 2000, Guido van Rossum wrote:
>...
> But it is just as likely that calling __del__ on a partially
> uninitialized object is a bad mistake, and I am doing all these cases
> a favor by not calling __del__ when __init__ failed!
> 
> Any opinions?  If nobody speaks up, I'll make the change.

+1 on calling __del__ IFF __init__ completes successfully.


Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/