From Python3 console:
$ python3
Python 3.4.2 (default, Oct 19 2014, 17:55:38)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 1.23
>>> b = a
>>> id(a)
4457705664
>>> id(b)
4457705664
>>> b = 5 # new object assigned to b
>>> id(b)
4456877312
>>> a = 5 # new object assigned to a?
>>> id(a)
4456877312
>>> a = 1.23 # should be a new object?
>>> id(a)
4457705664
So, my question here is hopefully pretty obvious. The ID of a changes when it is assigned to a new value, but when I reassign the value 1.23, the ID actually changes back to what it was originally. How does that work? My assumption is that once the object 1.23 had lost its references, it would be GC'd. Is this some kind of interpreter optimization or something?