#16316: cached_function and cached_method for unhashable elements
-------------------------------------+-------------------------------------
Reporter: saraedum | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-6.3
Component: misc | Resolution:
Keywords: | Merged in:
Authors: Julian Rueth | Reviewers: Peter Bruin
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/pbruin/16316-cache_key | c0a7fb816bff291f99053b623bf07468190eb49c
Dependencies: #16251 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by saraedum):
Replying to [comment:18 tscrim]:
> Actually...why not just implement a custom `__hash__` function for the
required elements? This seems like overkill and a custom `__hash__` would
also allow you to use this as a key for dictionaries, sets,
`UniqueRepresentation`, etc.
I'm not sure I understand. If p-adics implemented a non-trivial `__hash__`
then this could never be made to be consistent with our current `==`. The
intermediate function creates something with a new `==` which is then
consistent with its `__hash__`. Does this answer your question?
--
Ticket URL: <http://trac.sagemath.org/ticket/16316#comment:19>
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.