__del__ problem (destructor called After members of a class are deleted?)

Neil Schemenauer nascheme at enme.ucalgary.ca
Tue Apr 18 15:43:34 EDT 2000


Warren Postma <embed at geocities.com> wrote:
>Why is __del__ being called with a self = None ?
...
>Oversimplified Code Snippet:
...

Yes, oversimplified.  There is nothing wrong with the code you
posted.  Try adding a "print repr(self)" to the __del__ method to
debug this.

    Neil

-- 
"If you're a great programmer, you make all the routines depend on each
other, so little mistakes can really hurt you." -- Bill Gates, ca. 1985.



More information about the Python-list mailing list