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: 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: References: Date: Wed, 13 Jul 2011 10:10:45 -0700 X-Google-Sender-Auth: oSd3LqnYxFoxjnqKpzGi7RIPclo Subject: Re: sys.tracebacklimit From: Chris Rebert To: Vlad Didenko Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Wed, Jul 13, 2011 at 6:42 AM, Vlad Didenko wrote= : > Colleagues, > Per documentation > at=C2=A0http://docs.python.org/py3k/library/sys.html#sys.tracebacklimit= =C2=A0: > =C2=A0=C2=A0 =C2=A0 When [sys.tracebacklimit]=C2=A0set 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: > =C2=A0=C2=A0 =C2=A0import sys > =C2=A0=C2=A0 =C2=A0sys.tracebacklimit=3D0 > =C2=A0=C2=A0 =C2=A0print(1/0) > And see it's result as: > =C2=A0=C2=A0 =C2=A0=C2=A0ZeroDivisionError: division by zero > However, the actual result is: > =C2=A0=C2=A0 =C2=A0=C2=A0Traceback (most recent call last): > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0File "tbt.py", line 3, in > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0print(1/0) > =C2=A0=C2=A0 =C2=A0=C2=A0ZeroDivisionError: division by zero > Do I misunderstand the docs? Nope. It's a known bug: http://bugs.python.org/issue12276 Cheers, Chris