Greg Ewing <[EMAIL PROTECTED]> writes:
> All use of weakrefs can be hidden behind a call such as
>
> register_finalizer(self, func, *args, **kwds)
It should be possible to finalize the object explicitly, given a
handle returned by this function, and possibly to kill the finalizer
without execution.
The former is useful to implement close(). The latter is useful for
weak dictionaries: when an entry is removed because it's overwritten,
there is no need to keep a finalizer which will remove the old entry
when the key dies.
IMHO a weak reference can conveniently play the role of such handle.
--
__("< Marcin Kowalczyk
\__/ [EMAIL PROTECTED]
^^ http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com