title: Why don't these objects get GC'd?
body: <p>From Python3 console:</p>
  
  <pre><code>$ 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.
  &gt;&gt;&gt; a = 1.23
  &gt;&gt;&gt; b = a
  &gt;&gt;&gt; id(a)
  4457705664
  &gt;&gt;&gt; id(b)
  4457705664
  &gt;&gt;&gt; b = 5 # new object assigned to b
  &gt;&gt;&gt; id(b)
  4456877312
  &gt;&gt;&gt; a = 5 # new object assigned to a?
  &gt;&gt;&gt; id(a)
  4456877312
  &gt;&gt;&gt; a = 1.23 # should be a new object?
  &gt;&gt;&gt; id(a)
  4457705664
  </code></pre>
  
  <p>So, my question here is hopefully pretty obvious. The ID of <em>a</em> 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 <em>object</em> 1.23 had lost its references, it would be GC'd. Is this some kind of interpreter optimization or something?</p>