On Tue, Aug 8, 2017 at 7:54 AM, Daniel Krenn <kr...@aon.at> wrote:
> On 2017-08-07 22:53, David Roe wrote:
>>     >>> sorted([1,2,'a'])
>>     Traceback (most recent call last):
>>       File "<stdin>", line 1, in <module>
>>     TypeError: '<' not supported between instances of 'str' and 'int'
>> [...]
>> Which still leaves the second part of Stefan's question: how do we get
>> consistent doctest output in contexts where we have been sorting?
>
> sage: sorted([1,2,'a'], key=str)

+1, this is easy to grok

> or even
>
> sage: sorted([1,2,'a'], key=sage_total_order_as_we_have_it_now_key)
>
> if someone really wants the old behavior back.

-1 since it's not really sensible in the first place.

-- 
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.

Reply via email to