[Python-Dev] New methods for weakref.Weak*Dictionary types

Fred L. Drake, Jr. fdrake at acm.org
Mon May 1 23:26:34 CEST 2006


On Monday 01 May 2006 16:57, Tim Peters wrote:
 > +1.  A real need for this is explained in ZODB's ZODB/util.py's
 > WeakSet class, which contains a WeakValueDictionary:
...
 > As that implementation suggests, though, I'm not sure there's real
 > payback for the extra time taken in the patch's `valuerefs`
 > implementation to weed out weakrefs whose referents are already gone:
 > the caller has to make this check anyway when it iterates over the

Good point; I've updated the patch accordingly.


  -Fred

-- 
Fred L. Drake, Jr.   <fdrake at acm.org>


More information about the Python-Dev mailing list