A __del__ that does any kind of real work is asking for trouble. Use it to print a diagnostic reminding you to call .close() or .join() or use a with statement, and nothing else. For example: def close(self): self._closed = True self.do_interesting_finalisation_stuff() def __del__(self): if not self._closed: print("Programming error! Forgot to .close()", self) If you do anything the slightest bit more interesting tha…
Yeah, at some point, I was working on a prototype of finalization for JavaScript, and that was also my conclusion.