On Wed, Sep 16, 2009 at 3:48 AM, Paul Moore <span dir="ltr">&lt;<a href="mailto:p.f.moore@gmail.com">p.f.moore@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

2009/9/16 Michael Foord &lt;<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>&gt;:<br>
<div class="im">&gt; Georg Brandl wrote:<br>
&gt;&gt;<br>
&gt;&gt; May I have a short vote on this issue:<br>
&gt;&gt;<br>
&gt;&gt;   <a href="http://bugs.python.org/issue6903" target="_blank">http://bugs.python.org/issue6903</a><br>
&gt;&gt;<br>
&gt;&gt; In short, pdb (since 2.6) uses a separate displayhook in order to avoid<br>
&gt;&gt; _ being reassigned (which screws up debugging apps that use _ as gettext).<br>
&gt;&gt; In that displayhook, I did not add the suppression of printing None, as<br>
&gt;&gt; it can be confusing to look at variables and get no output:<br>
&gt;&gt;<br>
&gt;&gt; (Pdb) foo<br>
&gt;&gt; 1<br>
&gt;&gt; (Pdb) bar<br>
&gt;&gt; (Pdb)<br>
&gt;&gt;<br>
&gt;&gt; (You could argue that this is what the &quot;p&quot; command is for though.)<br>
&gt;&gt;<br>
&gt;&gt; Now in Python 3, where print is a function, if you call print in a loop<br>
&gt;&gt; (e.g. to debug a list or dictionary, as it is advertised in the pdb docs<br>
&gt;&gt; under the &quot;alias&quot; command), the output has the printed values interspersed<br>
&gt;&gt; with &quot;None&quot;s.<br>
&gt;&gt;<br>
&gt;&gt; Now, what is the lesser evil?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; IMO not showing the extraneous Nones is preferable.<br>
<br>
</div>I agree (although I don&#39;t use pdb, so my view shouldn&#39;t be given too<br>
much weight...)<br></blockquote><div><br></div><div>I *do* use pdb a lot, and I agree that the new behavior is weird. </div></div><br>-- <br>--Guido van Rossum (home page: <a href="http://www.python.org/~guido/">http://www.python.org/~guido/</a>)<br>