Why aren't destructors guaranteed to be called on interpreter exit?
From the python docs : It is not guaranteed that __del__() methods are called for objects that still exist when the interpreter exits. Why not? What problems would occur if this guarantee were made? I'm not convinced by the previous answers here. Firstly note that the example given does not prevent __del__ methods being called during exit. In fact, the current CPythons will call the __del__ method given, twice in the case of Python 2.7 and once in the case of Python 3.4. So this can't be the "killer example" which shows why the guarantee is not made. I think the statement in the docs is not