that is it is not it (logic in Python)

F. Petitjean littlejohn.75 at news.free.fr
Fri Apr 1 17:01:25 EST 2005


Le Fri, 1 Apr 2005 13:39:47 -0500, Terry Reedy a écrit :
> 
> "F. Petitjean" <littlejohn.75 at news.proxad.net> wrote in message 
> news:424d0be1$0$2882$626a14ce at news.free.fr...
> 
>>>>> iterable = range(10)
>>>>> it = iter(iterable)
>>>>> that = iter(it)
>>>>> that is it
>> True    # Good!
>>>>> that is it is not it
> 
> This is equivalent to '(that is it) and (it is not it)' which is clearly 
> false.
> 
>> False   # What ?
> 
> Reread the ref manual on chained comparison operators.
And see the date of the post :-)
that is it  isn't it ?
> 
> Terry J. Reedy
> 
> 
> 



More information about the Python-list mailing list