3 ms·
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.
by nerdponx 5y 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.
- slownews45 5y agoAgreed - 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.