Changes between Initial Version and Version 1 of Ticket #16743, comment 16
 Timestamp:
 09/24/14 14:05:46 (5 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #16743, comment 16
initial v1 12 12 > return cmp(I.norm(), J.norm()) or cmp(I.pari_hnf().sage(), J.pari_hnf().sage()) 13 13 > }}} 14 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)`. 14 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)`. See [http://python3porting.com/preparing.html#whensortingusekeyinsteadofcmp]