logoalt Hacker News

mattclarkdotnettoday at 4:53 AM1 replyview on HN

Let's not get started on the cached shared object refs for small integers....


Replies

zahlmantoday at 6:55 AM

What realistic use case do you have for caring about whether two integers of the same value are distinct objects? Modern versions of Python warn about doing unpredicatble things with `is` exactly because you are not supposed to do those things. Valid use cases for `is` at all are rare.