Strict comparisons in Python 2

Ian Kelly ian.g.kelly at gmail.com
Tue Oct 13 11:51:37 EDT 2015


On Tue, Oct 13, 2015 at 9:24 AM, Random832 <random832 at fastmail.com> wrote:
> Ian Kelly <ian.g.kelly at gmail.com> writes:
>> You couldn't do this with a __future__ import because those must be
>> confined to the importing module and are therefore generally limited
>> to syntax changes.
>
> In principle, it could be a syntax change to the < operator (etc) to
> cause it to try to call a different method first, same as division and
> the / operator. That'd be a bit heavyweight to do this late in the
> Python 2 cycle though.

And it also wouldn't change the behavior of list.sort.



More information about the Python-list mailing list