Re: [Python-Dev] PEP 8: mention bare 'except:'

2006-12-22 Thread Brett Cannon
On 12/22/06, A.M. Kuchling <[EMAIL PROTECTED]> wrote: > http://www.python.org/sf/411881 is a bug about removing use > of 'except:' in stdlib code. In many cases the intent is to catch > one particular exception such as ImportError or AttributeError, > but catching all exceptions can disguise othte

Re: [Python-Dev] PEP 8: mention bare 'except:'

2006-12-22 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Dec 22, 2006, at 8:05 AM, A.M. Kuchling wrote: >A good rule of thumb is that you should only use 'except:' if the >exception handler will be printing out or logging the traceback; at >least the user will be aware that an error has occur

[Python-Dev] PEP 8: mention bare 'except:'

2006-12-22 Thread A.M. Kuchling
http://www.python.org/sf/411881 is a bug about removing use of 'except:' in stdlib code. In many cases the intent is to catch one particular exception such as ImportError or AttributeError, but catching all exceptions can disguise other problems. Should PEP 8 mention this issue? Here's some prop