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: 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: References: <20150129113238.7eaa986d@bigbox.christie.dr> <87r3uchjyg.fsf@elektro.pacujo.net> <87r3ucljyv.fsf@elektro.pacujo.net> <87fvaslh9h.fsf@elektro.pacujo.net> <87zj90jngf.fsf@elektro.pacujo.net> Date: Sat, 31 Jan 2015 02:55:57 +1100 Subject: Re: The Most Diabolical Python Antipattern From: Chris Angelico Cc: Python 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Sat, Jan 31, 2015 at 2:42 AM, Ian Kelly 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