News for hackers. Stuff that matters.
Re:Python strings are immutable, but only sometimes by baud147258 on Monday February 15, 2021 @09:11PM (#26150146)
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.
Re:Python strings are immutable, but only sometimes by pansa2 on Monday February 15, 2021 @09:42PM (#26150333)
Yes, Python has an integer cache holding the values -5 to 256.