Hacker News new | ask | show | jobs
by nerdponx 1782 days ago
For what it's worth, using context managers for this kind of thing is pretty much standard nowadays, and not supporting this behavior feels jarring and archaic.
1 comments

Agreed - I spent so much time trouble shooting this exact issue because I honestly couldn't even imagine that I wasn't freeing the connection.

I ended just giving up and doing a close() after searching for every use. But even then didn't immediately understand what was going on.

With XXX do Y

is totally standard - but here we open but do not close.