is there anybody using __del__ correctly??
Michele Simionato
michele.simionato at gmail.com
Fri Aug 10 13:38:38 EDT 2007
On Aug 10, 7:09 pm, Steven Bethard <steven.beth... at gmail.com> wrote:
> There were also a few recipes posted during this discussion that wrap
> weakrefs up a bit nicer so it's easier to use them in place of __del__:
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/519635http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/519610http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/519621
>
> Since they're using weakrefs, you shouldn't have to worry about some of
> the weirdness of __del__.
>
> STeVe
Then I will mention my own contribution to the cookbook,
which does not use weak references, but just atexit:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/523007
More information about the Python-list
mailing list