Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/



Most people should not be writing __del__ methods at all, especially if what they are trying to do is deterministic cleanup.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: