#13378: Do not cache the non-existence of coerce/convert map too often, and do 
not
pretend that there is a conversion where it doesn't make sense at all
----------------------------------------------------+-----------------------
       Reporter:  SimonKing                         |         Owner:  robertwb  
  
           Type:  defect                            |        Status:  
needs_review
       Priority:  major                             |     Milestone:  sage-5.3  
  
      Component:  coercion                          |    Resolution:            
  
       Keywords:  coercion conversion object cache  |   Work issues:            
  
Report Upstream:  N/A                               |     Reviewers:            
  
        Authors:  Simon King                        |     Merged in:            
  
   Dependencies:                                    |      Stopgaps:            
  
----------------------------------------------------+-----------------------
Changes (by {'newvalue': u'Simon King', 'oldvalue': ''}):

  * status:  new => needs_review
  * author:  => Simon King


Comment:

 I am not totally sure if the patch has dependencies, but let's test. With
 the patch, it is tested whether the input is valid as the domain of a
 conversion map or a coercion map. There is a difference between the two
 cases! Namely, Sequences are OK for a conversion map, but not for a
 coercion map.

 If the input S is invalid, `P.coerce_map_from(S)` returns None, which is
 the expected answer if there is no coercion (hence, no error is raised).
 Because the short-cut is quick enough and in order to not pollute the
 cache, the answer is ''not'' cached.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13378#comment:6>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to