Hello,
Let me try to summarize:
1) The hash of Element is definitely wrong in *some* situations. For the
computation of Cayely graphs of finitely presented groups. Or if an
element is renamed as in
sage: class E(Element): pass
sage: e = E(Parent())
sage: e.rename('toto')
sage: hash(e)
2314052222105390764
sage: e.rename('bibi')
sage: hash(e)
1318956168382674112
2) Putting a stopgap in Element.__hash__ will end up in printing *a lot*
of annoying messages in any Sage session
3) Having a lot of warning messages in a stable release is very annoying
for the end user (that cares about the truthness of her computation but
also about the usability of the software)
There was also an argument about the fact that it is a long standing bug
in Sage. I decided to not add it to the list since it is not the opinion
of everybody that a long standing situation is necessarily not so bad.
There are various tickets to track the issue:
#19016: proposal to remove Element.__hash__ and hence inherit the
default TypeError raised from SageObject. There is actually a deep
problem as explained in comment 70 involving coercion...
#19302: straightforward implementation of the stopgap
#19321: pick some of the fixes from #19016 but does not touch to
Element.__hash__
#19331: return 0 as a default hash for Element
Now for me, the solutions I prefer by order of preferences
1) fix and merge #19016 before the stable
2) merge #19321 and #19331 before the stable
3) merge #19321 and #19302 before the stable
4) merge #19321 and #19302 in the first beta
I was not able to fix 1) by myself. So I would go to 2) if nobody
volunteers for it.
Quick links:
http://trac.sagemath.org/ticket/19016
http://trac.sagemath.org/ticket/19302
http://trac.sagemath.org/ticket/19321
http://trac.sagemath.org/ticket/19331
Hoping that we will finally reach something that we agree on ;-)
Vincent
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.