On Aug 23, 3:23 pm, David Philp <[EMAIL PROTECTED]> wrote: > 1+i < 2+i throws an exception ("invalid comparison with 1+i > attempted"). Order[a, b] is the same idea as python's cmp, except > that Order doesn't use "<", but some arbitrary ("canonical") > ordering. (To avoid weirdness, small numbers precede bigger numbers). > > Sort[ list ] uses Order to perform the sort. This always works. List > can contain any thing, including numbers, plots, etc, and they will > always come sorted in the same order. ... > Order is generally a pretty useful basic function, it would be > worthwhile providing something like it.
We can just use cmp(), if we want. Python lets you define < and cmp() separately, so we could leave cmp() total and still make < partial. Carl --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---