On Thu, Mar 12, 2009 at 2:17 AM, Nils Bruin <[email protected]> wrote:
>
> Given the resolution of
> http://trac.sagemath.org/sage_trac/ticket/3936
>
> it may be too hard to solve this one:
>
> A=GF(7)['h','k']
> B=RealField()['x','y']
> C=Integers()
> A<B #true
> B<C #true
> A<C #false
>
> Perhaps someone with more understanding of sage internals could give
> it a thought how comparison could be made more consistent? The whole
> point of having a universal ordering is that comparison is transitive.
One plus of having an ordering defined is that a wide range of outputs
can be returned in the same order between runs of Sage. I think it is
a good guiding principle that functions return output in the same
order when possible.
> On a side note, in order to get an idea of the extent to which
> transitivity fails, I tried to sort the pickle jar:
>
> L=[]
> path="/usr/local/sage/default/tmp/pickle_jar-3.4"
> for n in os.listdir(path):
> if n.endswith(".sobj"):
> L.append(load(path+"/"+n))
> L.sort()
>
> This fails on a:
> AttributeError: 'TranspositionCryptosystem' object has no attribute
> '_ring'
> (triggered by a __cmp__ somewhere)
That's definitely a bug. Please post it to trac. Thanks!
-- William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---