On Thu, 11 Feb 2010 16:16:59 -0600
"Edward K. Ream" <[email protected]> wrote:

> On Thu, Feb 11, 2010 at 3:50 PM, Terry Brown <[email protected]> wrote:
> 
> > a quick grep suggests "except:"  occurs quite often in Leo.  Should it?
> 
> Not in Leo's core, it shouldn't.

61 hits in .../leo/core, although less than that in core code :-)

And of course I haven't checked for what the except: block does, maybe some of 
them contain `raise`.

> Furthermore, there are a number of legitimate uses for 'except Exception'.

I think 'except Exception:' is an exception to the 'except:' anti-pattern :-)

'except Exception:' declares your intention to mask any error, it implies 
you've considered the consequences, more so than 'except:'.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to