On 10/13/2015 9:43 AM, Steven D'Aprano wrote:
In Python 3, comparisons between arbitrary types raise TypeError:
py> None < 2
Traceback (most recent call last):
File "", line 1, in
TypeError: unorderable types: NoneType() < int()
In Python 2, that same comparison will arbitrarily return Tru
On Tue, Oct 13, 2015 at 9:24 AM, Random832 wrote:
> Ian Kelly 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 < operato
Ian Kelly 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
On Oct 13, 2015 7:48 AM, "Steven D'Aprano" wrote:
>
> In Python 3, comparisons between arbitrary types raise TypeError:
>
> py> None < 2
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: unorderable types: NoneType() < int()
>
>
> In Python 2, that same comparison will arb
In Python 3, comparisons between arbitrary types raise TypeError:
py> None < 2
Traceback (most recent call last):
File "", line 1, in
TypeError: unorderable types: NoneType() < int()
In Python 2, that same comparison will arbitrarily return True or False,
according to some implementation-depe