#14159: Don't install callbacks on values of TripleDict, MonoDict
------------------------------+---------------------------------------------
       Reporter:  nbruin      |         Owner:  tbd         
           Type:  defect      |        Status:  needs_review
       Priority:  major       |     Milestone:  sage-5.8    
      Component:  memleak     |    Resolution:              
       Keywords:              |   Work issues:              
Report Upstream:  N/A         |     Reviewers:  Nils Bruin  
        Authors:  Simon King  |     Merged in:              
   Dependencies:  #13387      |      Stopgaps:              
------------------------------+---------------------------------------------

Comment (by nbruin):

 Replying to [comment:28 SimonKing]:
 > I was just wondering whether a `MonoDict  with weak values really makes
 sense. After all, it means: If you do `M[a]=b`, then this item will be
 deleted, unless you keep a strong reference to both a and b.

 Not so much because of the requirement for strong references (with weak
 caching, the idea is that ''unknown'' entities are still holding
 references), but more because in that case you might as well spell it
 {{{
 a.M=weakref(b)
 }}}
 Incidentally, see #14058 for another use case where weakrefs (without
 callbacks there!) get stored in a `TripleDict`. So that seems to be a
 strong indication that supporting weak values is indeed a reasonable think
 for it.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14159#comment:29>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to