News for hackers. Stuff that matters.
Re:WTFPython: Exploring and understanding Python through sur... by bjarneh on Tuesday May 31, 2022 @03:09AM (#31566868)
Luckily you don't typically compare numbers in Python with 'is'. In Java you should not compare Integer objects with '==' either of course, but '==' is typically used with numbers, and the auto-boxing features of Java makes it very easy to shoot your self in the foot with this stuff.

I once ran into a bug which had been there for years, since some Integer values had never crept over that magic limit, and auto-boxing allowed the numbers to be treated as int's all over, so it really took me some time to figure out what was going on...

There are no comments on this comment yet.