A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-November/040291.html below:

[Python-Dev] Making weakref callbacks safe in cyclic gc

[Python-Dev] Making weakref callbacks safe in cyclic gc [Python-Dev] Making weakref callbacks safe in cyclic gcFred L. Drake, Jr. fred at zope.com
Mon Nov 17 16:58:01 EST 2003
Neil Schemenauer writes:
 > I did not know that.

The callback is intended to be a notification that the referenced
object has gone away for anyone who's still interested.  To "lose
interest", you can just throw away you're reference.

 > I suppose if __del__ method continued to work the way they do,
 > people could just use weakref callbacks to do finalization.

Sigh.  So then everyone would wonder why the destructor registration
is done through the weakref module.  And constructors would assign a
weakref with a callback to an attribute on self.

Sounds nasty.


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4