#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 vdelecroix):

 Replying to [comment:99 nbruin]:
 > Replying to [comment:97 jdemeyer]:
 > > 3. Could you justify the need to add lots of comparison functions?
 >
 > Yes, I wonder too. Not including those would save us adding a whole
 bunch of silly doctests too.

 The only reason was some failing doctests. It appeared that most
 comparisons were not properly implemented in crystals. I do not care, but
 I did not find any simpler way to fix the doctests.

 The best would be to implement an `ElementWrapper_with_cmp`.

 > > 4. Why is this needed?
 > > {{{
 > > #!diff
 > > -        return self.element_class(self, m)
 > > +        return self.element_class(self, ZZ(m))
 > > }}}
 >
 > If `self.m` should be an `Integer` this is a good way of enforcing it. I
 don't think we did this before? perhaps this is covered in `element_class`
 already. I'm not familiar with this code (and didn't add that patch)

 I really don't remember why I did this. The crystal code is weirdly
 written, and most of my commits were obtained by try and errors.

 Vincent

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