#19016: A more naive sage.structure.element.__hash__
----------------------------------+----------------------------
       Reporter:  ncohen          |        Owner:
           Type:  defect          |       Status:  needs_review
       Priority:  blocker         |    Milestone:  sage-6.9
      Component:  misc            |   Resolution:
       Keywords:                  |    Merged in:
        Authors:  Nathann Cohen   |    Reviewers:
Report Upstream:  N/A             |  Work issues:
         Branch:  u/ncohen/19016  |       Commit:
   Dependencies:                  |     Stopgaps:
----------------------------------+----------------------------
Changes (by ncohen):

 * status:  new => needs_review
 * branch:   => u/ncohen/19016


Old description:

> As reported on sage-devel [1], the default hash function implemented in
> `Element` makes it very likely that `hash` and `==` will not agree. With
> this branch, the hash is constant and set to 0, making it less likely.
> Incidentally, it fixes the following bug:
> {{{
>     sage: G = groups.presentation.Cyclic(4)
>     sage: G.cayley_graph().vertices()
>     [1, a, a^2, a^-2, a^3, a^-1]
> }}}
>
> Nathann
>
> [1]

New description:

 As reported on sage-devel [1], the default hash function implemented in
 `Element` makes it very likely that `hash` and `==` will not agree. With
 this branch, the hash is constant and set to 0, making it less likely.
 Incidentally, it fixes the following bug:
 {{{
     sage: G = groups.presentation.Cyclic(4)
     sage: G.cayley_graph().vertices()
     [1, a, a^2, a^-2, a^3, a^-1]
 }}}

 Nathann

 [1] https://groups.google.com/d/topic/sage-devel/6rXKkF87Gtc/discussion

--

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

Reply via email to