order of object desctruction

bromden bromden at gazeta.pl.no.spam
Tue Oct 28 16:39:12 EST 2003


this is really tricky,

if an imported module is still available within the __del__ 
method of some object seems to depend on implementation, version 
and a bit of luck (then it's all about timing, i think),

so generally you should stick to the rule that "__del__() 
methods should do the absolute minimum needed to maintain 
external invariants" and use the conditional

-- 
bromden[at]gazeta.pl





More information about the Python-list mailing list