Re:WTFPython: Exploring and understanding Python through sur...
by philote on Tuesday May 31, 2022 @10:31AM
(#31569916)
It's confusing because using 100 works fine; both are seen as the same object. But using a number over 256 causes it to fail to see both as the same object. Of course, as an experienced dev, I would never use "is" for comparing integers, only for comparing things I know are objects that may otherwise be equal in value.
[ Parent
| on HN ]
There are no comments on this comment yet.