3 ms·
The "numbers less than 256 are the same objects" reminds me of the existence of the IntegerCache in Java, with an array storing the number from -128 to 127.
by baud147258 6y ago
The "numbers less than 256 are the same objects" reminds me of the existence of the IntegerCache in Java, with an array storing the number from -128 to 127.
- pansa2 6y agoYes, Python has an integer cache holding the values -5 to 256.