Re: Shorter tracebacks

2008-12-14 Thread Peter Otten
Peter Otten wrote: > That's none of __future__'s business, I think. Python offers a hook which > you can modify: > import sys, traceback from functools import partial sys.excepthook = partial(traceback.print_exception, limit=5) I just stumbled upon >>> import sys >>> sys.tracebac

Re: Shorter tracebacks

2008-12-13 Thread Peter Otten
bearophileh...@lycos.com wrote: > When I write recursive code in Python I sometimes go past the maximum > allowed stack depth, so I receive a really long traceback. The show of > such traceback on my screen is very slow (despite a CPU able to > perform billions of operations each second). So I thi

Re: Shorter tracebacks

2008-12-13 Thread rdmurray
On Sat, 13 Dec 2008 at 06:13, bearophileh...@lycos.com wrote: When I write recursive code in Python I sometimes go past the maximum allowed stack depth, so I receive a really long traceback. The show of such traceback on my screen is very slow (despite a CPU able to perform billions of operations

Shorter tracebacks

2008-12-13 Thread bearophileHUGS
When I write recursive code in Python I sometimes go past the maximum allowed stack depth, so I receive a really long traceback. The show of such traceback on my screen is very slow (despite a CPU able to perform billions of operations each second). So I think I'd like something to shorten them. I