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

Warren Postma embed at geocities.com
Tue Apr 18 15:13:08 EDT 2000


What's going on here?

Exception except.AttributeError: "'None' object has no attribute 'time'" in
<met
hod lwdb_base.__del__ of lwdb_hash instance at 5de410> ignored
Exception except.AttributeError: "'None' object has no attribute
'delete_DB'" in
 <method DBPtr.__del__ of DB instance at 5dfd00> ignored
Exception except.AttributeError: "'None' object has no attribute 'time'" in
<met
hod lwdb_base.__del__ of lwdb_base instance at 5de6d0> ignored


Why is __del__ being called with a self = None ?



Oversimplified Code Snippet:

class foo(bar):
    def close(self):
        # pretend I do stuff here

    def __del__(self):
        #print "lwdbtable.__del__"
        self.close()


Warren





More information about the Python-list mailing list