Remix.run Logo
perrygeo 6 hours ago

> small int (0-256) cached

It's -5 to 256, and these have very tricky behavior for programmers that confuse identity and equality.

  >>> a = -5
  >>> b = -5
  >>> a is b
  True
  >>> a = -6
  >>> b = -6
  >>> a is b
  False
Tostino an hour ago | parent [-]

Java does similar. Confusing for beginners who run into it for the first time for sure.