Best way to disconnect from ldap?

Tim Chase python.list at
Thu Mar 22 18:54:29 CET 2012

On 03/22/12 12:26, Steven D'Aprano wrote:
> On Thu, 22 Mar 2012 08:14:47 -0500, Tycho Andersen wrote:
>> Given that you can't trust __del__, is there a legitimate
>> use case for it?
> I've never found the need to write one.

I've found the need to write them...then been frustrated by 
things falling out of namespace reach, and found that context 
managers do a much more reliable/understandable job, saving what 
little sanity I had left. ;-)

So I'd say that __del__ was really only useful (for some sick, 
sick definition of "useful") in versions of Python before 
context-managers were readily available.


More information about the Python-list mailing list