Optimizer gets better and better. In 3.7, even 123456788+1 is 123456789 gives True. It's simply that Python realizes it can evaluate constant pure expressions before compiling to bytecode. And it folds constants, of course.
>>> compile('123456788+1 is 123456789', '', 'eval').co_consts
You'll notice there's only one 123456789 there, not two. And there are no 123456788 nor 1.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Optimizer gets better and better. In 3.7, even 123456788+1 is 123456789 gives True. It's simply that Python realizes it can evaluate constant pure expressions before compiling to bytecode. And it folds constants, of course.
>>> compile('123456788+1 is 123456789', '', 'eval').co_consts
You'll notice there's only one 123456789 there, not two. And there are no 123456788 nor 1.