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


Groups > comp.lang.python > #24610

Re: exception problem

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ethan@stoneleaf.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'bug.': 0.07; 'python': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; 'do,': 0.15; 'subject:exception': 0.16; 'wrote:': 0.17; 'certainly': 0.17; 'subject:problem': 0.22; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; "d'aprano": 0.29; 'steven': 0.29; 'no,': 0.29; 'to:addr:python- list': 0.33; 'wrong': 0.34; 'along': 0.35; 'needed': 0.35; 'charset:us-ascii': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'most': 0.61; 'information': 0.63; 'received:67.18': 0.65
Date Thu, 28 Jun 2012 05:52:57 -0700
From Ethan Furman <ethan@stoneleaf.us>
User-Agent Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version 1.0
To python-list@python.org
Subject Re: exception problem
References <4FE79433.8020704@earthlink.net> <4FE7982C.5020708@mrabarnett.plus.com> <mailman.1466.1340579780.4697.python-list@python.org> <4fe817d3$0$29866$c3e8da3$5496439d@news.astraweb.com> <4FEBA18C.5090204@earthlink.net>
In-Reply-To <4FEBA18C.5090204@earthlink.net>
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - gator410.hostgator.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - stoneleaf.us
X-BWhitelist no
X-Source
X-Source-Args
X-Source-Dir
X-Source-Sender ([192.168.74.2]) [50.137.155.36]:3427
X-Source-Auth ethan+stoneleaf.us
X-Email-Count 1
X-Source-Cap dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ==
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.1601.1340888470.4697.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1340888470 news.xs4all.nl 6850 [2001:888:2000:d::a6]:60161
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:24610

Show key headers only | View raw


Charles Hixson wrote:
> On 06/25/2012 12:48 AM, Steven D'Aprano wrote:
>> "Catch any exception" is almost certainly the wrong thing to do, almost
>> always.
>>    
> This time it was the right thing

No, it wasn't.  If you hadn't caught it, Python would have printed it 
out for you, along with the full trace-back, giving you most if not all 
the information you needed to track down the bug.

~Ethan~

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


Thread

Re: exception problem Charles Hixson <charleshixsn@earthlink.net> - 2012-06-24 16:16 -0700
  Re: exception problem Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-06-25 07:48 +0000
    Re: exception problem Charles Hixson <charleshixsn@earthlink.net> - 2012-06-27 17:13 -0700
      Re: exception problem alex23 <wuwei23@gmail.com> - 2012-06-27 17:36 -0700
      Re: exception problem Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-06-28 03:44 +0000
    Re: exception problem Ethan Furman <ethan@stoneleaf.us> - 2012-06-28 05:52 -0700

csiph-web