title: strange python destructor behaviour
body: <p>While playing with OO Python I came across following curiosity. Consider following simple class:</p>
  
  <pre><code>&gt;&gt;&gt; class Monty():
      def __init__(self):
          print 'start m'
      def __del__(self):
          print 'deleted m'
  </code></pre>
  
  <p>Instantiating object goes as expected:</p>
  
  <pre><code>&gt;&gt;&gt; a = Monty()
  start m
  &gt;&gt;&gt; a
  &lt;__main__.Monty instance at 0x7fdf9f084830&gt;
  </code></pre>
  
  <p>and now the funny part:</p>
  
  <pre><code>&gt;&gt;&gt; del a
  &gt;&gt;&gt; a = Monty()
  start m
  &gt;&gt;&gt; a
  deleted m
  &lt;__main__.Monty instance at 0x7fdf9f083fc8&gt;
  &gt;&gt;&gt; a
  &lt;__main__.Monty instance at 0x7fdf9f083fc8&gt;
  &gt;&gt;&gt; del a
  &gt;&gt;&gt; a = Monty()
  start m
  &gt;&gt;&gt; del(a)
  deleted m
  &gt;&gt;&gt; a = Monty()
  start m
  &gt;&gt;&gt; a
  deleted m
  &lt;__main__.Monty instance at 0x7fdf9f084830&gt;
  </code></pre>
  
  <p>The confusing part here is that I get message from destructor with delay. My understanding is that:</p>
  
  <pre><code>del a
  </code></pre>
  
  <p>Deletes object reference so that object a is left for garbage collection. But for some reason interpreter waits with passing message to console. </p>
  
  <p>Another this is the difference between </p>
  
  <pre><code>del x
  </code></pre>
  
  <p>and </p>
  
  <pre><code>del(x)
  </code></pre>
  
  <p>since if you ran the code using the latter only everything goes as expected - you get immediate info from destructor.</p>
  
  <p>It is possible to reproduce this on Python 2.7 as well as using Python 3.3.</p>