This does seem to be new. In Sage 7.2 (just one that I had handy), sage: sorted([1,2,'a']) [1, 2, 'a'] sage: sorted([1r,2r,'a']) [1, 2, 'a'] This isn't that surprising, since the semantics of comparison have been changing because of the upcoming switch to python 3. But I think that Sage integers should compare the same as python ints, so I've opened a ticket #23590 <https://trac.sagemath.org/ticket/23590>. David
On Mon, Aug 7, 2017 at 1:20 PM, Stefan <stefanvanz...@gmail.com> wrote: > Is this behavior new? I got it on my MacBook running the latest > development version. And, more importantly, what is the recommended way of > writing doctests for functions that return frozen sets with strings and > integers? In particular in light of Python 3 coming up... > > > sage: sorted([1,2,'a']) > ['a', 1, 2] > sage: sorted([int(1),int(2),'a']) > [1, 2, 'a'] > > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.