#7420: Fix uncaught infinite loop in coercion discovery
--------------------------------------------------+-------------------------
   Reporter:  nthiery                             |       Owner:  mhansen     
       Type:  defect                              |      Status:  needs_review
   Priority:  blocker                             |   Milestone:  sage-4.2.1  
  Component:  coercion                            |    Keywords:  coercion    
Work_issues:                                      |      Author:  Mike Hansen 
   Reviewer:  Nicolas M. ThiƩry, Robert Bradshaw  |      Merged:              
--------------------------------------------------+-------------------------

Comment(by robertwb):

 Yes, calling _register_pair would work here, even a helper is_registered
 function might be better than using _coerce_test_dict directly.

 Also, instead of

 {{{
                 connection = None
                 if EltPair(mor._domain, S, "coerce") not in
 _coerce_test_dict:
                     connecting = mor._domain.coerce_map_from(S)
                 if connecting is not None:
 }}}

 it might be clearer to do

 {{{
                 if EltPair(mor._domain, S, "coerce") not in
 _coerce_test_dict:
                     connecting = mor._domain.coerce_map_from(S)
                     if connecting is not None:
                         ...

 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7420#comment:3>
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