Is this a bug with __del__()
Gareth McCaughan
Gareth.McCaughan at pobox.com
Thu May 24 17:38:23 EDT 2001
Costas Menico wrote:
> >> Why does the __del__ get called for a class when all I am doing is
> >> creating an object? It seems to be a problem..
> >
> >Probably because the object you've created gets destroyed when python
> >cleans up prior to exiting.
>
> Have you tired running it? Why does the "Delete called" show up before
> the "program end"?
I've tried running it. I get
| Program End
| Delete called
exactly as I'd expect. What version of Python are you using?
--
Gareth McCaughan Gareth.McCaughan at pobox.com
.sig under construc
More information about the Python-list
mailing list