On Thu, 21 Sep 2017 10:16 am, Rick Johnson wrote:
>> You've never wanted to sort strings? How do you sort
>> strings unless you have a concept of which string comes
>> before the other, i.e. < operator?
>>
>> >>> 'xyz' < 'abc'
>> False
>
> Interesting. But now we need to learn yet another set of
On Thu, Sep 21, 2017 at 10:16 AM, Rick Johnson
wrote:
>> >>> 'xyz' < 'abc'
>> False
>
> Interesting. But now we need to learn yet another set of
> arbitrary rules. Consider this:
>
> >>> 'azzz' > 'zzz'
> False
>
> Now, i'm not sure how Python decided that 'azzz' is not
> greater than 'zzz'
Steven D'Aprano wrote:
> Rick Johnson wrote:
>
> > Of course, allowing all objects to use the `==`, `!=`
> > sugars makes perfect sense, but `<`, `>`, `<=`, `>=` are
> > meaningless outside of numeric-ish types.
>
> You've never wanted to sort strings? How do you sort
> strings unless you have a
On Tue, 19 Sep 2017 17:26:55 -0700, Rick Johnson wrote:
> Of course, allowing all objects to use the `==`, `!=` sugars makes
> perfect sense, but `<`, `>`, `<=`, `>=` are meaningless outside of
> numeric-ish types.
You've never wanted to sort strings? How do you sort strings unless you
have a c