Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90735
| Path | csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.pionier.net.pl!feed.xsnews.nl!border03.ams.xsnews.nl!feeder04.ams.xsnews.nl!abp002.ams.xsnews.nl!frontend-F09-06.ams.news.kpn.nl |
|---|---|
| From | Cecil Westerhof <Cecil@decebal.nl> |
| Newsgroups | comp.lang.python |
| Subject | Re: Minimising stack trace |
| Organization | Decebal Computing |
| References | <871tih66z5.fsf@Equus.decebal.nl> |
| X-Face | "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR<J%a^F2lh4[N~Yz4 nSp#c+aQo1b5=?HcNEkQ7QzF<])O3X4MDL/AYjys&*mt>,v+Pti8=Vi/Z"g^?b"E |
| X-Homepage | http://www.decebal.nl/ |
| Date | Sat, 16 May 2015 15:49:42 +0200 |
| Message-ID | <87382wfx8p.fsf@Equus.decebal.nl> (permalink) |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
| Cancel-Lock | sha1:ouYDw69epIRZYy9wnwZyFOqMLvQ= |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 20 |
| NNTP-Posting-Host | 81.207.62.244 |
| X-Trace | 1431784820 news.kpn.nl 20456 81.207.62.244@kpn/81.207.62.244:52520 |
| Xref | csiph.com comp.lang.python:90735 |
Show key headers only | View raw
Op Friday 15 May 2015 20:17 CEST schreef Cecil Westerhof:
> While playing with recursion I get:
> RuntimeError: maximum recursion depth exceeded in comparison
>
> But then I get a very long stack trace. Is there a way to make this
> a lot shorter. Now I ‘lose’ interesting information because of the
> length of the stack trace.
I found something. I could use:
import sys
sys.tracebacklimit = 10
The output is different, but I find it useful enough.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Minimising stack trace Cecil Westerhof <Cecil@decebal.nl> - 2015-05-15 20:17 +0200
Re: Minimising stack trace Ned Batchelder <ned@nedbatchelder.com> - 2015-05-15 12:04 -0700
Re: Minimising stack trace Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-15 14:14 -0500
Re: Minimising stack trace Cecil Westerhof <Cecil@decebal.nl> - 2015-05-16 09:22 +0200
Re: Minimising stack trace Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-15 21:41 +0200
Re: Minimising stack trace Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-16 10:57 +1000
Re: Minimising stack trace Ned Batchelder <ned@nedbatchelder.com> - 2015-05-15 18:24 -0700
Re: Minimising stack trace Chris Angelico <rosuav@gmail.com> - 2015-05-16 11:33 +1000
Re: Minimising stack trace Ned Batchelder <ned@nedbatchelder.com> - 2015-05-15 18:37 -0700
Re: Minimising stack trace Rustom Mody <rustompmody@gmail.com> - 2015-05-15 19:51 -0700
Re: Minimising stack trace Rustom Mody <rustompmody@gmail.com> - 2015-05-15 19:59 -0700
Re: Minimising stack trace Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-16 04:49 +0100
Re: Minimising stack trace Cecil Westerhof <Cecil@decebal.nl> - 2015-05-16 15:49 +0200
csiph-web