by xapata · 6y ago · 0 comments
BTW, Python does have the `__del__` special method. It's just that almost all usage of it would be better implemented via context manager.
Particularly note "finalize provides a straight forward way to register a cleanup function to be called when an object is garbage collected"