#13394: Write a WeakValueDictionary with safer key removal
-------------------------------------+-------------------------------------
       Reporter:  nbruin             |        Owner:  rlm
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-5.13
      Component:  memleak            |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Simon King, Nils   |    Reviewers:  Simon King
  Bruin                              |  Work issues:
Report Upstream:  None of the above  |       Commit:
  - read trac for reasoning.         |  851cc9522dde332561101f1c84182a0a84b8eed4
         Branch:                     |     Stopgaps:
  u/SimonKing/ticket/13394           |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by SimonKing):

 I have tested (by inserting print statements into
 `del_dictitem_by_exact_value`) that the following is a valid test for the
 callback silently doing the right thing:
 {{{
 sage: from sage.misc.weak_dict import WeakValueDictionary
 sage: V = [set(range(n)) for n in range(5)]
 sage: D = WeakValueDictionary(enumerate(V))
 sage: for k in D.iterkeys():
 ....:     V[k] = None
 ....:     D[k] = ZZ
 }}}
 So, this could be added as a test.

 I just see that you have also tried to push something. I'll see what you
 suggest, will merge, and then I'll push the result.

--
Ticket URL: <http://trac.sagemath.org/ticket/13394#comment:66>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to