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


Groups > comp.lang.python > #41339

Re: PyWart: NameError trackbacks are superfluous

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 <rosuav@gmail.com>
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 <e6e760f7-eb3a-41c8-b52c-f14ee73aabb1@googlegroups.com> <mailman.3372.1363468797.2939.python-list@python.org> <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 <rosuav@gmail.com>
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 <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.3376.1363478365.2939.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Sun, Mar 17, 2013 at 10:48 AM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PyWart: NameError trackbacks are superfluous Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-16 11:27 -0700
  Re: PyWart: NameError trackbacks are superfluous Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-03-16 21:19 +0000
    Re: PyWart: NameError trackbacks are superfluous Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-16 15:39 -0700
      Re: PyWart: NameError trackbacks are superfluous Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-03-16 23:29 +0000
        Re: PyWart: NameError trackbacks are superfluous Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-16 16:50 -0700
          Re: PyWart: NameError trackbacks are superfluous Chris Angelico <rosuav@gmail.com> - 2013-03-17 11:00 +1100
      Re: PyWart: NameError trackbacks are superfluous Tim Chase <python.list@tim.thechases.com> - 2013-03-16 18:36 -0500
      Re: PyWart: NameError trackbacks are superfluous Chris Angelico <rosuav@gmail.com> - 2013-03-17 10:48 +1100
    Re: PyWart: NameError trackbacks are superfluous Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-16 23:48 +0000
      Re: PyWart: NameError trackbacks are superfluous Chris Angelico <rosuav@gmail.com> - 2013-03-17 10:59 +1100
      Re: PyWart: NameError trackbacks are superfluous Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-16 17:11 -0700
        Re: PyWart: NameError trackbacks are superfluous Michael Torrie <torriem@gmail.com> - 2013-03-16 19:58 -0600
          Re: PyWart: NameError trackbacks are superfluous Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-17 03:14 +0000
            Re: PyWart: NameError trackbacks are superfluous Chris Angelico <rosuav@gmail.com> - 2013-03-17 14:19 +1100
            Re: PyWart: NameError trackbacks are superfluous Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-03-16 21:13 -0700
  Re: PyWart: NameError trackbacks are superfluous Jason Swails <jason.swails@gmail.com> - 2013-03-17 17:22 -0400

csiph-web