Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9415

Re: sys.tracebacklimit

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <chris@rebertia.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'sys': 0.05; 'url:bugs': 0.05; 'bug:': 0.09; 'less,': 0.09; 'exception': 0.12; 'skip:[ 20': 0.12; 'wed,': 0.12; 'am,': 0.13; 'wrote:': 0.15; 'suppressed': 0.16; 'cc:addr:python-list': 0.16; 'subject:skip:s 10': 0.19; 'cheers,': 0.19; '(most': 0.21; 'cc:2**0': 0.21; 'header:In-Reply- To:1': 0.22; 'division': 0.23; 'traceback': 0.25; 'expect': 0.25; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.30; 'skip:\xc2 20': 0.30; 'url:library': 0.31; 'chris': 0.32; 'however,': 0.34; 'last):': 0.35; 'like:': 0.35; 'actual': 0.35; 'url:python': 0.37; 'received:google.com': 0.38; 'received:209.85.161': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; '8bit%:8': 0.38; 'url:docs': 0.39; 'received:209': 0.40; '\xc2\xa0\xc2\xa0': 0.67; 'as:': 0.71; 'skip:\xc2 10': 0.74; 'sender:addr:chris': 0.84; '\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0': 0.84; '8bit%:18': 0.95
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SXcblOKqLx95SY5mvdpNLUspbjkj3oT8glywKWXPMr0=; b=QXS6Uh1pLSdV2Ug1u+oAKbCGAS21R+/xflYC6CeBY/jvqqs1I5iYTJLTi6Y/d0KgiK v6p8nAlPAvmRJQLBB+Fp/eQ+gwdRjxa86fT4IPG9AU+Lh9gSQlzP8o3yRRmMgqwF6IsP 7XV2VgJbuA2zW1qxr/uQoDtHmAvmPY7XPxW6c=
MIME-Version 1.0
Sender chris@rebertia.com
In-Reply-To <CA430AFA.2EE2B%vdidenko@getcollc.com>
References <CA430AFA.2EE2B%vdidenko@getcollc.com>
Date Wed, 13 Jul 2011 10:10:45 -0700
X-Google-Sender-Auth oSd3LqnYxFoxjnqKpzGi7RIPclo
Subject Re: sys.tracebacklimit
From Chris Rebert <clp2@rebertia.com>
To Vlad Didenko <vdidenko@getcollc.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.999.1310577048.1164.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1310577048 news.xs4all.nl 23913 [2001:888:2000:d::a6]:36752
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:9415

Show key headers only | View raw


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


Thread

Re: sys.tracebacklimit Chris Rebert <clp2@rebertia.com> - 2011-07-13 10:10 -0700

csiph-web