[Tutor] special call for deleted objects?

Thomas Clive Richards thomi at thomi.imail.net.nz
Thu Jan 29 19:33:23 EST 2004


Hi Guys,


I've got a list of class instances, and under certain conditions, I want to 
replace them with None. However, these instances should do some cleanup 
before they dissapear. I *could* create a cleanup method, and call it 
specifically every time I want to delete the instance, and then replace it 
with None, but I thought there might be a special method that automatically 
gets called when an object is deleted.


Am I on the right track? I took a browse through the docs, and couldn't see 
any mention of such a method, but maybe it's hidden away for a reason...

Is following this train of thought more trouble than it's worth? (probably I'm 
guessing)...


Thanks...

-- 

Thomi Richards,
thomi at once.net.nz




More information about the Tutor mailing list