On Wed, Sep 16, 2009 at 3:48 AM, Paul Moore <span dir="ltr"><<a href="mailto:p.f.moore@gmail.com">p.f.moore@gmail.com</a>></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 <<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>>:<br>
<div class="im">> Georg Brandl wrote:<br>
>><br>
>> May I have a short vote on this issue:<br>
>><br>
>> <a href="http://bugs.python.org/issue6903" target="_blank">http://bugs.python.org/issue6903</a><br>
>><br>
>> In short, pdb (since 2.6) uses a separate displayhook in order to avoid<br>
>> _ being reassigned (which screws up debugging apps that use _ as gettext).<br>
>> In that displayhook, I did not add the suppression of printing None, as<br>
>> it can be confusing to look at variables and get no output:<br>
>><br>
>> (Pdb) foo<br>
>> 1<br>
>> (Pdb) bar<br>
>> (Pdb)<br>
>><br>
>> (You could argue that this is what the "p" command is for though.)<br>
>><br>
>> Now in Python 3, where print is a function, if you call print in a loop<br>
>> (e.g. to debug a list or dictionary, as it is advertised in the pdb docs<br>
>> under the "alias" command), the output has the printed values interspersed<br>
>> with "None"s.<br>
>><br>
>> Now, what is the lesser evil?<br>
>><br>
>><br>
><br>
> IMO not showing the extraneous Nones is preferable.<br>
<br>
</div>I agree (although I don't use pdb, so my view shouldn'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>