#11895: Make p-adic numbers unhashable
-------------------------------------+-------------------------------------
Reporter: mmasdeu | Owner: roed
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-6.4
Component: padics | Resolution:
Keywords: p-adic, hash | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues: one pickle from the
Branch: | pickle jar does not unpickle
u/saraedum/ticket/11895 | correctly
Dependencies: #11670, #15897, | Commit:
#15898, #15956, #16122, #16124, | 42afa4d47da18d38095cd54313731f856ae5f083
#16129, #16250, #16251, #16316, | Stopgaps:
#16317, #16318, #16321, #16339, |
#16341, #16342 |
-------------------------------------+-------------------------------------
Comment (by vbraun):
Replying to [comment:44 saraedum]:
> I'm not sure I understand. Say you are in Qp with 2 digits of precision.
Then 0 coerces to `O(p^2)`. Setting `x=O(p)` gives `x != 0` when including
precisions in the comparison.
Ok, I hadn't thought about that. But IMHO thats more of an issue with
having two separate and competing ways of specifying precision, one in the
parent and one in the element:
{{{
sage: O(3).parent()(3)
3 + O(3^21)
}}}
> I agree that disabling hashing has its drawbacks but I do not see an
alternative.
I don't have a good answer right now either, but it once again shows the
importance of this issue. We need to fix our failure to adhere to Python's
convention about comparison and hashes.
--
Ticket URL: <http://trac.sagemath.org/ticket/11895#comment:45>
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/d/optout.