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


Groups > comp.lang.python > #13036

Re: try... except with unknown error types

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <stefan-usenet@bytereef.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'instance': 0.05; 'url:bugs': 0.05; ':-)': 0.06; 'limit,': 0.07; 'url:peps': 0.09; 'subject:error': 0.10; 'static': 0.15; 'both.': 0.16; 'exceptions.': 0.16; 'ioerror': 0.16; 'oserror': 0.16; 'url:hg': 0.16; 'this:': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.22; 'raise': 0.28; 'stefan': 0.29; 'fix': 0.29; 'operations': 0.30; 'at.': 0.30; 'i/o': 0.30; 'url:dev': 0.30; 'chris': 0.32; 'there': 0.33; 'to:addr:python-list': 0.33; '...': 0.34; 'header:User- Agent:1': 0.34; 'charset:us-ascii': 0.36; 'url:python': 0.36; 'something': 0.37; 'could': 0.38; 'think': 0.38; 'received:org': 0.38; 'url:org': 0.38; 'subject:: ': 0.39; 'files,': 0.39; 'subject:with': 0.39; 'to:addr:python.org': 0.39; 'sense': 0.39; 'taking': 0.66; 'concept': 0.72; 'analysis': 0.75; 'subject:... ': 0.84; 'subject:types': 0.84; 'failures': 0.91; 'request:': 0.91
Date Fri, 9 Sep 2011 23:41:18 +0200
From Stefan Krah <stefan-usenet@bytereef.org>
To python-list@python.org
Subject Re: try... except with unknown error types
References <mailman.230.1313780957.27778.python-list@python.org> <4e5015ad$0$29986$c3e8da3$5496439d@news.astraweb.com> <7xty9ahb84.fsf@ruckus.brouhaha.com> <mailman.286.1313956388.27778.python-list@python.org> <j3m7fe0284i@news3.newsguy.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <j3m7fe0284i@news3.newsguy.com>
User-Agent Mutt/1.5.18 (2008-05-17)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.916.1315604988.27778.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1315604988 news.xs4all.nl 2527 [2001:888:2000:d::a6]:34952
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:13036

Show key headers only | View raw


Chris Torek <nospam@torek.net> wrote:
> (I have also never been sure whether something is going to raise
> an IOError or an OSError for various OS-related read or write
> operation failures -- such as exceeding a resource limit, for
> instance -- so most places that do I/O operations on OS files, I
> catch both.  Still, it sure would be nice to have a static analysis
> tool that could answer questions about potential exceptions. :-) )

There is an effort to fix this:

http://www.python.org/dev/peps/pep-3151/


And an implementation ...

http://hg.python.org/features/pep-3151/


... together with a feature request:

http://bugs.python.org/issue12555


I think the whole concept makes a lot of sense and is really worth
taking a look at.


Stefan Krah

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


Thread

try... except with unknown error types Yingjie Lin <Yingjie.Lin@mssm.edu> - 2011-08-19 15:09 -0400
  Re: try... except with unknown error types John Gordon <gordon@panix.com> - 2011-08-19 19:14 +0000
    Re: try... except with unknown error types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-20 06:13 +1000
      Re: try... except with unknown error types John Gordon <gordon@panix.com> - 2011-08-19 20:24 +0000
        Re: try... except with unknown error types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-20 06:45 +1000
          Re: try... except with unknown error types Seebs <usenet-nospam@seebs.net> - 2011-08-20 05:46 +0000
        Re: try... except with unknown error types John Nagle <nagle@animats.com> - 2011-08-20 13:15 -0700
      Re: try... except with unknown error types Paul Rubin <no.email@nospam.invalid> - 2011-08-20 12:18 -0700
        Re: try... except with unknown error types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-21 06:14 +1000
          Re: try... except with unknown error types Paul Rubin <no.email@nospam.invalid> - 2011-08-21 11:26 -0700
            Re: try... except with unknown error types Chris Angelico <rosuav@gmail.com> - 2011-08-21 20:17 +0100
              Re: try... except with unknown error types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-22 10:30 +1000
                Re: try... except with unknown error types Chris Angelico <rosuav@gmail.com> - 2011-08-22 01:41 +0100
                Re: try... except with unknown error types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-22 14:01 +1000
                Re: try... except with unknown error types Paul Rubin <no.email@nospam.invalid> - 2011-08-23 00:21 -0700
                Re: try... except with unknown error types Chris Angelico <rosuav@gmail.com> - 2011-08-23 09:26 +0100
                Re: try... except with unknown error types gene heskett <gheskett@wdtv.com> - 2011-08-23 04:43 -0400
                Re: try... except with unknown error types Paul Rubin <no.email@nospam.invalid> - 2011-08-23 10:43 -0700
                Re: try... except with unknown error types Chris Angelico <rosuav@gmail.com> - 2011-08-23 10:07 +0100
                Re: try... except with unknown error types John Nagle <nagle@animats.com> - 2011-08-31 21:22 -0700
            Re: try... except with unknown error types Ethan Furman <ethan@stoneleaf.us> - 2011-08-21 12:22 -0700
            Re: try... except with unknown error types Terry Reedy <tjreedy@udel.edu> - 2011-08-21 15:52 -0400
              Re: try... except with unknown error types Chris Torek <nospam@torek.net> - 2011-08-31 21:01 +0000
                Re: try... except with unknown error types Stefan Krah <stefan-usenet@bytereef.org> - 2011-09-09 23:41 +0200
                Re: try... except with unknown error types Nobody <nobody@nowhere.com> - 2011-09-10 10:33 +0100
                Re: try... except with unknown error types Peter Otten <__peter__@web.de> - 2011-09-10 12:17 +0200
            Re: try... except with unknown error types Roy Smith <roy@panix.com> - 2011-08-21 17:14 -0400
            Re: try... except with unknown error types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-22 10:25 +1000
              Re: try... except with unknown error types Roy Smith <roy@panix.com> - 2011-08-21 22:09 -0400
            Re: try... except with unknown error types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-23 18:33 +1000

csiph-web