Weak Reference List (preliminary) implementation
Mike C. Fletcher
mcfletch at rogers.com
Tue Dec 3 09:08:22 EST 2002
I have just built a weak-reference list-sub-class, similar to
WeakKeyDictionary or WeakValueDictionary. I'm wondering a few things:
* is there any interest in this functionality (beyond myself)?
* does anyone have a fully tested and reliable version of a weak
reference list sub-class?
* is this functionality something that should be added to the
standard weak reference module?
I've attached my (fairly trivial) sub-class below. There are a number
of thread safety issues (particularly anything which runs between a
referent being gc'd and the weak reference callback getting run can
cause problems (not sure if that can actually happen or not, but I would
guess it's possible)).
Enjoy yourselves,
Mike
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: weaklist.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20021203/ba06c967/attachment.ksh>
More information about the Python-list
mailing list