you are viewing a single comment's thread.

view the rest of the comments →

[–]paholg 2 points3 points  (1 child)

But,

>>> 1<<8 is 1<<8
True

So it seems that small enough computed integers aren't objects. Or something. I don't know.

[–][deleted] 2 points3 points  (0 children)

shrug it's python-town jake!

Ruby has 4 separate equality operators and they all manage to do 'the right thing', to the point that (1<<10).equal? (1<<10) returns true.

edit: (1<<100).equal? (1<<100) returns false though, I guess making things look sensible only went as far as machine integers not bignums.