[issue38001] Unexpected behaviour of 'is' operator

2019-09-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Further to Karthikeyan Singaravelan comment, the behaviour you see is absolutely correct. The operator isn't behaving differently, it is reporting precisely the truth. The ``is`` operator tests for object identity, not equality. Python makes no promises ab

[issue38001] Unexpected behaviour of 'is' operator

2019-09-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue38001] Unexpected behaviour of 'is' operator

2019-09-01 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This will emit a SyntaxWarning in Python 3.8 to use == instead of using is for literals. This is not a bug but an implementation detail over caching a range of integers at https://github.com/python/cpython/blob/1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0

[issue38001] Unexpected behaviour of 'is' operator

2019-09-01 Thread Digin Antony
New submission from Digin Antony : The 'is' operator behave differently on two sets of values please find the attachment below tested environment windows 7 python 3.7.3 Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "c