#16743: Extend IsogenyClass_EC to work over number fields
-------------------------------------+-------------------------------------
       Reporter:  cremona            |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  elliptic curves    |   Resolution:
       Keywords:  isogeny class      |    Merged in:
        Authors:  John Cremona       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/cremona/ticket/16743             |  06d9eb2226151a35bb2d3779e5309f4d066af8ca
   Dependencies:  #11327, #16764,    |     Stopgaps:
  #16806                             |
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Replying to [comment:12 jdemeyer]:
 > Finally, a Python tip: you can shorten
 > {{{
 > t = int(I.norm() - J.norm())
 > if t:
 >     return cmp(t,0)
 >
 > return cmp(I.pari_hnf().sage(), J.pari_hnf().sage())
 > }}}
 > to
 > {{{
 > return cmp(I.norm(), J.norm()) or cmp(I.pari_hnf().sage(),
 J.pari_hnf().sage())
 > }}}
 Better yet: define a sorting ''key'' instead of a comparison function,
 this is the only(!) way in Python 3 and already works now. Your key would
 then be the tuple `(norm,hnf)`.

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