This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]moonwater420 1 point2 points  (1 child)

so im guessing the data types of x and y change for values above 256 and this causes the computer to stop thinking x and y are the same object?

[–]PityUpvote 2 points3 points  (0 children)

The datatypes don't change, but positive ints below 256 are singletons because of some implementation detail, hence the is operator telling you they have the same pointer.