How to pop the interpreter's stack?

John Nagle nagle at animats.com
Fri Dec 17 02:07:44 EST 2010


On 12/14/2010 6:31 PM, Ethan Furman wrote:
> kj wrote:
>> The one thing I don't like about this strategy is that the tracebacks
>> of exceptions raised during the execution of __pre_spam include one
>> unwanted stack level (namely, the one corresponding to __pre_spam
>> itself).
>>
>> __pre_spam should be completely invisible and unobtrusive
>
> I am unaware of any way to accomplish what you desire. I also think this
> is one of those things that's not worth fighting -- how often are you
> going to see such a traceback? When somebody makes a coding mistake?

     Right.  If you are worried about what the user sees in a traceback,
you are doing it wrong.

     Consider reporting detailed error information via the logging
module, for example.

				John Nagle



More information about the Python-list mailing list