How do most people do console.log debugging in Python?
<p>In Node.js when I want to quickly check the value of something rather than busting out the debugger and stepping through, I quickly add a console.log(foo) and get a beautiful:</p>

<pre><code>{
   lemmons: "pie",
   number: 9,
   fetch: function(){..}
   elements: {
      fire: 99.9
   }
}
</code></pre>

<p>Very clear! In Python I get this:</p>

<pre><code>class LinkedList:
  head = None
  tail = None
  lemmons = 99
</code></pre>

<p><code>&lt;__main__.LinkedList instance at 0x105989f80&gt;</code>
or with <code>vars()</code>,</p>

<p><code>{}</code></p>

<p>or with <code>dir()</code>, </p>

<p><code>['_LinkedList__Node', '__doc__', '__module__', 'append', 'get_tail', 'head', 'lemmons', 'remove', 'tail']</code></p>

<p>Yuck! Look at all that nonsense - I thought python was supposed to be fast, beautiful and clean? Is this really how people do it? Do they implement customer <strong>str</strong> and custom <strong>repr</strong> for everything? Because that seems kind of crazy too..</p>