Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'infinite': 0.07; 'exceptions': 0.09; 'runtime': 0.09; 'subject:error': 0.10; 'am,': 0.12; 'exception': 0.12; '(either': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subclassing': 0.16; 'mon,': 0.16; 'wrote:': 0.16; "aren't": 0.21; 'header:In-Reply- To:1': 0.22; 'aug': 0.24; 'expect': 0.25; 'parameters': 0.25; 'message-id:@mail.gmail.com': 0.29; "won't": 0.29; 'fairly': 0.30; '22,': 0.30; 'there': 0.33; 'to:addr:python-list': 0.33; 'but': 0.37; 'steven': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'subject:with': 0.39; 'why': 0.39; 'to:addr:python.org': 0.39; 'case': 0.39; 'fall': 0.64; 'subject:... ': 0.84; 'subject:types': 0.84; 'failures': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=4yMidkyg1uhb1bGMfKJbMq/AFNYzEF1EC6ZYZ+3Ovss=; b=ErloMqVJY0/EiCis2jNdukxi9o73n8VKXCKLkqMAuZtGFIQ8ggfFGyYycFWIBncGdR 7enZnkwdPpdbEuEBhxN55EQ1M+RnPZaJl3fAIbGP+Y4EPP4KUD92/GT5FcRiqZ6UqxIA /FYwca93lWCDCqC3zjniNhXwgr7l5rBXqmoXg= MIME-Version: 1.0 In-Reply-To: <4e51a32d$0$29974$c3e8da3$5496439d@news.astraweb.com> References: <4e4ec405$0$29994$c3e8da3$5496439d@news.astraweb.com> <7xipprsxha.fsf@ruckus.brouhaha.com> <4e5015ad$0$29986$c3e8da3$5496439d@news.astraweb.com> <7xty9ahb84.fsf@ruckus.brouhaha.com> <4e51a32d$0$29974$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 22 Aug 2011 01:41:47 +0100 Subject: Re: try... except with unknown error types 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.12 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1313973709 news.xs4all.nl 23887 [2001:888:2000:d::a6]:54755 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11977 On Mon, Aug 22, 2011 at 1:30 AM, Steven D'Aprano wrote: > /s/would/should/ > > I don't see why you expect this, when *existing* network-related failures > aren't Ehh, granted. Definitely a case of "should". But certainly, there won't be an infinite number of new exceptions invented; most of the runtime issues you'll have will fall into a fairly small number of exception types (either by subclassing or by parameters eg errno). ChrisA