wtfpython icon indicating copy to clipboard operation
wtfpython copied to clipboard

Syntax error dependent on size of number

Open jneb opened this issue 2 years ago • 2 comments

How about this one:

>>> 4 ** 300 == 8 ** 200
True
>>> 4 ** 300 is 8 ** 200
False

>>> 4 ** 30 is 8 ** 20
SyntaxWarning: "is" with a literal. Did you mean "=="?
  4 ** 30 is 8 ** 20
True

jneb avatar Feb 03 '23 16:02 jneb