News for hackers. Stuff that matters.
Re:Why does `True == False is False` evaluate to False in Py... by mkl on Saturday May 02, 2020 @09:06AM (#23051543)
Small integer caching: https://wsvincent.com/python-wat-integer-cache/

The objects for small integers are built-in and static, but 17^2 is too big, and so new integer objects are created when the expressions are evaluated. "is" checks if two expressions represent the same object in memory. "==" checks for equality of values.

There are no comments on this comment yet.