[Tutor] Program gets stuck after a creating a list from dictinary items!
Steven D'Aprano
steve at pearwood.info
Sat Jul 7 05:35:15 CEST 2012
Alan Gauld wrote:
> On 06/07/12 22:16, Ali Torkamani wrote:
>> have the pdb.set_trace()'s for debugging, to see what's going on inside.
>
> So what does it show?
>
> If you aren't using it get rid of it. The less distractions there are
> the easier it is to debug things.
I find it ironic that you are suggesting removing the debugger to make it
easier to debug the code :)
(Not that I entirely disagree -- I find that 9 times out of 10 it's easier to
debug code just using print statements and the interactive interpreter than
with the debugger.)
>> ho would you debug that?
>
> I'd either add some more print statements or I'd run it inside a
> debugger.
Which is what pdb is :)
Nevertheless, if the Original Poster is not actually using the debugger, he
should remove the debugger calls.
--
Steven
More information about the Tutor
mailing list