5 ms·
My favorite new feature is PEP-442 [0]. Basically, it's now safe to add a __del__ method to a class without worrying about memory leaks caused by reference cyc
by ngoldbaum 12y ago
My favorite new feature is PEP-442 [0]. Basically, it's now safe to add a __del__ method to a class without worrying about memory leaks caused by reference cycles.
[0] https://www.python.org/dev/peps/pep-0442/ https://www.python.org/dev/peps/pep-0442/
- pekk 12y agoMost people should not be writing __del__ methods at all, especially if what they are trying to do is deterministic cleanup.