Comment

Comment by saagarjha

> Be careful, however, as there is no guarantee that __del__ will be executed if the object is still alive when the interpreter exits, so __del__ can't serve as a replacement for good coding practices (like always closing a connection when you're done with it.

When the interpreter exits, your program's resources should be reclaimed by the operating system, right? So why not just use __del__?

parent saagarjha 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton