Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #22035

Re: Best way to disconnect from ldap?

Date 2012-03-22 12:54 -0500
From Tim Chase <python.list@tim.thechases.com>
Subject Re: Best way to disconnect from ldap?
References (1 earlier) <CAMZYqRQR0VFweQgN8jb3wkx-opabvVQJy5zRtQQrv7tnnzivwA@mail.gmail.com> <CALvWhxvq-KO0ZxMwo-A7ieLyULHh95LAAiLon3zqBgMixZpFbA@mail.gmail.com> <4F6A4D02.6020403@tim.thechases.com> <mailman.885.1332422068.3037.python-list@python.org> <4f6b60b2$0$29981$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.894.1332438846.3037.python-list@python.org> (permalink)

Show all headers | View raw


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.

-tkc


Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Best way to disconnect from ldap? John Gordon <gordon@panix.com> - 2012-03-21 19:30 +0000
  Re: Best way to disconnect from ldap? "J. Cliff Dyer" <jcd@sdf.lonestar.org> - 2012-03-21 16:21 -0400
  Re: Best way to disconnect from ldap? Chris Rebert <clp2@rebertia.com> - 2012-03-21 13:34 -0700
  Re: Best way to disconnect from ldap? Chris Kaynor <ckaynor@zindagigames.com> - 2012-03-21 13:54 -0700
  Re: Best way to disconnect from ldap? Tycho Andersen <tycho@tycho.ws> - 2012-03-22 08:14 -0500
    Re: Best way to disconnect from ldap? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-03-22 17:26 +0000
      Re: Best way to disconnect from ldap? Tim Chase <python.list@tim.thechases.com> - 2012-03-22 12:54 -0500
      Re: Best way to disconnect from ldap? Terry Reedy <tjreedy@udel.edu> - 2012-03-22 15:27 -0400
      Re: Best way to disconnect from ldap? Tycho Andersen <tycho@tycho.ws> - 2012-03-22 16:02 -0500
  Re: Best way to disconnect from ldap? Chris Rebert <clp2@rebertia.com> - 2012-03-22 06:27 -0700
  Re: Best way to disconnect from ldap? Tycho Andersen <tycho@tycho.ws> - 2012-03-22 09:00 -0500
  Re: Best way to disconnect from ldap? John Gordon <gordon@panix.com> - 2012-04-05 18:38 +0000
    Re: Best way to disconnect from ldap? Michael Ströder <michael@stroeder.com> - 2012-04-05 20:56 +0200

csiph-web