20 Apr
2000
20 Apr
'00
1:24 p.m.
On Wed, Apr 19, 2000 at 07:53:09PM -0400, Garion wrote:
For some reason, in my product, the __del__(self) is not being called when I delete an instance of it.. I currently have it defined as:
def __del__(self): raise "DEBUG", "TEST" In python, the __del__ method doesn't get called until every reference to the object has disappeared and it is being garbage collected. The "del foo" statement jsut decreases the reference count of foo by 1 (and when it hits zero, it is garbage collected).
Doah... I guess it plainly obvious I'm not a python person eh? Just learning it.. But I definitly like it.. How to I know when an instance is deleted?? I need this to be able to remove a record in a DB.. Any suggestions? --John