Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'calls.': 0.07; 'omit': 0.07; 'different?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'merely': 0.16; 'nameerror': 0.16; 'wrote:': 0.17; 'example.': 0.17; 'equivalent': 0.20; 'occurs': 0.22; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'actual': 0.28; "d'aprano": 0.29; 'steven': 0.29; 'succeed': 0.29; 'function': 0.30; 'expect': 0.31; 'code': 0.31; 'print': 0.32; 'problem': 0.33; 'to:addr :python-list': 0.33; 'received:google.com': 0.34; 'fail': 0.35; 'received:209.85': 0.35; 'should': 0.36; 'enough': 0.36; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'truly': 0.62; 'more': 0.63; '2013': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=ZB7TEls9PGU9XEjvu0o69T/yBf/la0gDt6Tx0T6Aw6o=; b=dwyiBj1Jr2FiyF6iNyX0kmTR0Ucm7JDAdCQPcMcik0iltVNfqm+edTOJnK5hsapReZ nqfqCP7T4RAyj7cmAKufHAJ0AoNkLrRhbuEPmTGBqeFpl4h3Nj69dSfhh+wykacolHyf Euz3UHBAPGVQ7DJQGjsdmzKxlevVI366qgg40KOXJqhYR9ORf3UUmagYbgRIJ1Vrs0+o duE5yImgd3yUIneO7s8ra4I8Z0Yn91ZmWro0fvy/bS2DX09a7+3UNukfBkEy3Q27rOU9 Q2iiibOeyoxmVOA5hQNJI+OxO6j7lpWTMhYo0VdTwoa2TgFDof2Db1+7p0DTxz9oZfGc 26CA== MIME-Version: 1.0 X-Received: by 10.58.56.161 with SMTP id b1mr13786944veq.42.1363478357719; Sat, 16 Mar 2013 16:59:17 -0700 (PDT) In-Reply-To: <514504b1$0$29965$c3e8da3$5496439d@news.astraweb.com> References: <514504b1$0$29965$c3e8da3$5496439d@news.astraweb.com> Date: Sun, 17 Mar 2013 10:59:17 +1100 Subject: Re: PyWart: NameError trackbacks are superfluous From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363478365 news.xs4all.nl 6922 [2001:888:2000:d::a6]:58273 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41339 On Sun, Mar 17, 2013 at 10:48 AM, Steven D'Aprano wrote: > Here's a truly trivial case where code will succeed or fail depending on > the order of function calls. > (chop code) > It's not enough to know that the print line in display() fails, because > that's merely the side-effect. The actual problem occurs in the caller, > fail(). If NameError suppressed the traceback, that would be more > difficult to solve. A good example. It would be logically equivalent to set spam=None in stop(), and nobody would expect the TypeError to omit the traceback, so why should delling the name be any different? ChrisA