[issue45230] Something wrong when Calculate "3==3 is not True"

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it is a feature. Python allows you to chain comparison operations, so you can write 0 < x <= 10 which is equivalent to (0 < x) and (x <= 10). And "is" is a comparison operation. So `3==3 is not True` is equivalent to `(3==3) and (3 is not True)`

[issue45230] Something wrong when Calculate "3==3 is not True"

2021-09-17 Thread Wang Bingchao
New submission from Wang Bingchao <819576...@qq.com>: I use python3.7 python3.6 python2.7, and run the following code: print(3==3 is not True) print(3==3 is True) print(3==2 is not True) print(3==2 is True) I got the same results as follow: True False False False but I don't think it is a