#19016: Better hash for Element
-------------------------------------+-------------------------------------
       Reporter:  ncohen             |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  critical           |    Milestone:  sage-6.10
      Component:  misc               |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Nils Bruin,        |    Reviewers:
  Vincent Delecroix                  |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  public/19016-bis   |  fcf799ce33270401e9dce7bfcf4f383dbcedc49d
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by nbruin):

 Replying to [comment:104 vdelecroix]:
 > Replying to [comment:103 nbruin]:
 > > I think we can remove the 0 hash on `Ideal_generic` without affecting
 doctests, so I'd say we should. Let's see what Vincent's opinion is.
 >
 > If it works without hash, let us go without of course!

 As Jeroen points out, this ticket needs another merge/rebase. I know I
 would screw that up. Would you be able to do it? I'd be fully in favour if
 you'd also implement some of the suggested changes here in the process.

 > I actually used some, for example in `crystals/elementary_crystals.py`.
 But I tend to agree with Nils that in most cases, this will be useless (or
 badly used).

 I don't think you did. The `hash(self.parent())` is on
 `AbstractSingleCrystalElement` which has it `eq` defined as `self.parent()
 is other.parent()`, so making the hash equal to that of the parent is
 entirely justified there.

 I think the `self.element_class(self, ZZ(m))` looks justifiable, so I'd be
 OK with leaving that in.

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