#20246: Use `with strict_equality(True)` to work around hashing of p-adics
-------------------------------------+-------------------------------------
       Reporter:  saraedum           |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-7.2
      Component:  padics             |   Resolution:
       Keywords:  days71             |    Merged in:
        Authors:  Julian RĂ¼th        |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  
u/saraedum/use__with_strict_equality_true___to_work_around_hashing_of_p_adics|  
f4c5a9db729ccf911517039fdced282588210133
   Dependencies:  #16342, #16339     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by nbruin):

 It would seem to me that storing data keyed by "imprecise" data like
 p-adic numbers is likely a program error. Are we sure that allowing cached
 data keyed by p-adics is essential?

 The solution proposed here -- introducing a global flag to change the
 semantics of comparison -- scares me. It sounds like a horrible bugtrap to
 me. Note that python allows for multiple threads. Changing a global flag
 like this would not only make the particular thread this happens in non-
 threadsafe, but it would change the behaviour of other threads too (that
 may otherwise think they are threadsafe).

 I think it's worth quite a bit to avoid having to put in this horrible
 hack, including looking at the scenarios that seem to need this feature
 and see how they can be rewritten to not need p-adics to be hashable.

--
Ticket URL: <http://trac.sagemath.org/ticket/20246#comment:21>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to