Best way to disconnect from ldap?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Mar 22 18:26:11 CET 2012


On Thu, 22 Mar 2012 08:14:47 -0500, Tycho Andersen wrote:

> I've had similar experiences. In fact, in light of all this - why does
> __del__ exist at all? Novice python users may (reasonably) assume it
> behaves similarly to a C++ destructor (even though the docs warn
> otherwise).

What makes you think that novice Python users will be familiar with C++ 
destructors?

Be careful about assuming that idioms in <INSERT FAVOURITE LANGUAGE HERE> 
will be shared by all Python programmers, novice or expert.


> Given that you can't trust __del__, is there a legitimate use case for
> it?

I've never found the need to write one.



-- 
Steven



More information about the Python-list mailing list