bare excepts

Robert Collins robertc at robertcollins.net
Wed Jan 4 06:50:15 GMT 2006


On Wed, 2006-01-04 at 12:08 +1100, Martin Pool wrote:

> Yes, +1 on grepping for it.  A counter seems a bit likely to let them
> slip through - maybe allow the form
> 
>   try:
>   except:    # WARNING BARE EXCEPT
> 
> if the comment is there with those exact words.

A counter forces a manual check on every one - if it goes up or down its
obvious. A warning like that requires a full grep of the source rather
than a quick check of the code sanity tests to detect changes ...

I can do either, but I'm very much in favour of a counter.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060104/d441f914/attachment.pgp 


More information about the bazaar mailing list