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


Groups > comp.lang.python > #41339

Re: PyWart: NameError trackbacks are superfluous

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 2013-03-17 10:59 +1100
Subject Re: PyWart: NameError trackbacks are superfluous
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3376.1363478365.2939.python-list@python.org> (permalink)

Show all headers | 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