title: How to debug uncalled __del__()
body: <p>I use <code>__del__()</code> to write a warning log in case the object gets deleted while in a wrong internal state (please no wrath about it).</p>
  
  <p>I tried to test it but although I use <code>del my_object</code> in the test, the <code>__del__()</code> doesn't seem to be called.</p>
  
  <p><a href="http://docs.python.org/reference/datamodel.html#object.__del__" rel="nofollow"><code>__del__()</code>'s reference</a> warns of 3 situations where this might happen, but doesn't give a clue on how to debug them.</p>
  
  <p>So... How do I go about debugging it?</p>