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


Groups > comp.lang.python > #84895

Re: The Most Diabolical Python Antipattern

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!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.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.06; 'unrecognized': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'times,': 0.14; 'chained': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'exception': 0.16; 'sat,': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; '31,': 0.24; 'cc:2**0': 0.24; 'order.': 0.26; 'suggested': 0.26; 'header :In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'exceptions': 0.31; 'received:google.com': 0.35; 'catch': 0.60; 'ian': 0.60; 'simply': 0.61; 'subject:The': 0.64; '2015': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=g5chDJBgJTkM0ZfDrSGI+IfU6CaUc/yGEmRwijyzuas=; b=HwVsYL/Mk59jK9fifcr34GadGIDD2Mryjmw9IR76jUM64TqdCjxEPSfjHERI8OE0VR 5vU0MxZsG3GWocic3xM0F1Ehukj8E0E9hOnBo9AFJag+qTMtuLdTNIpRvgN+cUCw5fT3 icWhrlQCNQnm34dvZ/4/Sl80sGqPDSr316JYatd+jEnNSk1qHsk2wb2iF6sWpaesKMT3 +gtr79YQ0yHXot8nPr2seT6FYvjZC0CvOlhoysr80gN8rQcX++vxxgPJJLeSN1bC/F15 4mui7eKbMZOA+lookarHfK3dqbb6qeo94RmR3XLL23b6sz8XMriRy5nsfkW2OJbufr1T Ztgg==
MIME-Version 1.0
X-Received by 10.107.14.131 with SMTP id 125mr7914629ioo.53.1422633357401; Fri, 30 Jan 2015 07:55:57 -0800 (PST)
In-Reply-To <CALwzid=htmO2A1TW7UXJzFkbXgypgm5h6XLM2zNL2Mzw1uQUuA@mail.gmail.com>
References <madpuv$he7$1@ger.gmane.org> <20150129113238.7eaa986d@bigbox.christie.dr> <mailman.18286.1422571931.18130.python-list@python.org> <87r3uchjyg.fsf@elektro.pacujo.net> <mailman.18296.1422605482.18130.python-list@python.org> <87r3ucljyv.fsf@elektro.pacujo.net> <87fvaslh9h.fsf@elektro.pacujo.net> <mailman.18306.1422631319.18130.python-list@python.org> <87zj90jngf.fsf@elektro.pacujo.net> <CALwzid=htmO2A1TW7UXJzFkbXgypgm5h6XLM2zNL2Mzw1uQUuA@mail.gmail.com>
Date Sat, 31 Jan 2015 02:55:57 +1100
Subject Re: The Most Diabolical Python Antipattern
From Chris Angelico <rosuav@gmail.com>
Cc Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.18309.1422633366.18130.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1422633366 news.xs4all.nl 2934 [2001:888:2000:d::a6]:42109
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:84895

Show key headers only | View raw


On Sat, Jan 31, 2015 at 2:42 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> Like I suggested earlier, just don't catch the inner exception at all.
> The result will be both exceptions propagated, chained in the proper
> order.

So many MANY times, the best thing to do with unrecognized exceptions
is simply to not catch them.

ChrisA

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


Thread

Re: The Most Diabolical Python Antipattern Ian Kelly <ian.g.kelly@gmail.com> - 2015-01-29 15:51 -0700
  Re: The Most Diabolical Python Antipattern Marko Rauhamaa <marko@pacujo.net> - 2015-01-30 08:16 +0200
    Re: The Most Diabolical Python Antipattern Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-30 08:10 +0000
      Re: The Most Diabolical Python Antipattern Marko Rauhamaa <marko@pacujo.net> - 2015-01-30 11:02 +0200
        Re: The Most Diabolical Python Antipattern Ian Kelly <ian.g.kelly@gmail.com> - 2015-01-30 02:17 -0700
        Re: The Most Diabolical Python Antipattern Marko Rauhamaa <marko@pacujo.net> - 2015-01-30 12:00 +0200
          Re: The Most Diabolical Python Antipattern Ian Kelly <ian.g.kelly@gmail.com> - 2015-01-30 08:21 -0700
            Re: The Most Diabolical Python Antipattern Marko Rauhamaa <marko@pacujo.net> - 2015-01-30 17:30 +0200
              Re: The Most Diabolical Python Antipattern Ian Kelly <ian.g.kelly@gmail.com> - 2015-01-30 08:42 -0700
                Re: The Most Diabolical Python Antipattern Marko Rauhamaa <marko@pacujo.net> - 2015-01-30 17:56 +0200
                Re: The Most Diabolical Python Antipattern Ian Kelly <ian.g.kelly@gmail.com> - 2015-01-30 09:38 -0700
              Re: The Most Diabolical Python Antipattern Chris Angelico <rosuav@gmail.com> - 2015-01-31 02:55 +1100
    Re: The Most Diabolical Python Antipattern Ian Kelly <ian.g.kelly@gmail.com> - 2015-01-30 02:11 -0700
    Re: The Most Diabolical Python Antipattern Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-31 01:28 +0000

csiph-web