Opened 5 years ago

Last modified 5 years ago

#19016 closed defect

A more naive sage.structure.element.__hash__ — at Version 1

Reported by: ncohen Owned by:
Priority: critical Milestone: sage-6.10
Component: misc Keywords:
Cc: Merged in:
Authors: Nathann Cohen Reviewers:
Report Upstream: N/A Work issues:
Branch: u/ncohen/19016 (Commits) Commit:
Dependencies: Stopgaps:

Description (last modified by ncohen)

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]



Change History (1)

comment:1 Changed 5 years ago by ncohen

  • Branch set to u/ncohen/19016
  • Description modified (diff)
  • Status changed from new to needs_review
Note: See TracTickets for help on using tickets.