PyWart: NameError trackbacks are superfluous
oscar.j.benjamin at gmail.com
Sun Mar 17 00:29:52 CET 2013
On 16 March 2013 22:39, Rick Johnson <rantingrickjohnson at gmail.com> wrote:
> On Saturday, March 16, 2013 4:19:34 PM UTC-5, Oscar Benjamin wrote:
>> The traceback shows the arguments passed to the broken
>> function that caused the NameError to be generated.
>> Different arguments would not have generated the
>> NameError. This information can be useful if the logic of
>> the function in question is complicated. It also hints at
>> why you were calling the function and what your code is
>> trying to do.
> If you want to observe your code "in action" there are much better ways than eyeball-parsing lines and lines of trackbacks. The code you posted is nonsense, maybe you can provide a better example that will convince me, but that one failed miserably.
I wasn't looking to convince *you*, just to set the record straight
that this behaviour is sometimes useful. In any case, even when the
traceback information is not helpful, printing it is really not a
problem and hardly a "wart".
More information about the Python-list