Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9415
| References | <CA430AFA.2EE2B%vdidenko@getcollc.com> |
|---|---|
| Date | 2011-07-13 10:10 -0700 |
| Subject | Re: sys.tracebacklimit |
| From | Chris Rebert <clp2@rebertia.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.999.1310577048.1164.python-list@python.org> (permalink) |
On Wed, Jul 13, 2011 at 6:42 AM, Vlad Didenko <vdidenko@getcollc.com> wrote: > Colleagues, > Per documentation > at http://docs.python.org/py3k/library/sys.html#sys.tracebacklimit : > When [sys.tracebacklimit] set to 0 or less, all traceback information > is suppressed and only the exception type and value are printed > So, I expect to be able to have a program like: > import sys > sys.tracebacklimit=0 > print(1/0) > And see it's result as: > ZeroDivisionError: division by zero > However, the actual result is: > Traceback (most recent call last): > File "tbt.py", line 3, in <module> > print(1/0) > ZeroDivisionError: division by zero > Do I misunderstand the docs? Nope. It's a known bug: http://bugs.python.org/issue12276 Cheers, Chris
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: sys.tracebacklimit Chris Rebert <clp2@rebertia.com> - 2011-07-13 10:10 -0700
csiph-web