Order of object cleanup at interpreter exit?
Rob W. W. Hooft
rob at hooft.net
Tue Feb 15 08:29:07 EST 2000
>>>>> "MH" == Michael Hudson <mwh21 at cam.ac.uk> writes:
MH> Try this:
MH> def __del__(self,sendfixed=sendfixed):
MH> if self.status>0:
MH> sendfixed(self.sock1,'EXIT')
MH> self.status=-1
MH> That way, sendfixed shouldn't get collected before the instance
MH> object.
This is a much cleaner workaround than what I had thought of. Thanks.
Rob
--
===== rob at hooft.net http://www.xs4all.nl/~hooft/rob/ =====
===== R&D, Nonius BV, Delft http://www.nonius.nl/ =====
===== PGPid 0xFA19277D ========================== Use Linux! =========
More information about the Python-list
mailing list