#16127: Fix comparison of PARI objects
-------------------------------------+-------------------------------------
       Reporter:  pbruin             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  critical           |    Milestone:  sage-6.4
      Component:  interfaces         |   Resolution:
       Keywords:  pari comparison    |    Merged in:
        Authors:  Peter Bruin        |    Reviewers:  Jeroen Demeyer
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/pbruin/16127-pari_comparison     |  0e0b4da393fa63c54e6f8c3ade0309ec198c2ffe
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Agreed with your last comment.

 In the code for totally real fields, I wonder whether it is really needed
 to sort on "polynomials". Sorting by discriminant seems sensible (and
 that's also what is documented), but since there is no meaningful
 comparison for polynomials, why bother in the first place? So my proposal
 would be to replace
 {{{
 S.sort(cmp=lambda x, y: cmp(x[0], y[0]) or cmp(x[1], y[1]))
 }}}
 by
 {{{
 S.sort(key=lambda x: x[0])
 }}}

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