Interest check in some delicious syntactic sugar for "except:pass"
Tim Chase
python.list at tim.thechases.com
Wed Mar 3 07:55:54 EST 2010
Oren Elrad wrote:
> I'm wondering if there is any support (tepid better than none) for the
> following syntactic sugar:
>
> silence:
> ........ block
>
> ------------------------->
>
> try:
> ........block
> except:
> ........pass
The general response to "except: pass" from the Old Ones on the
python list (and those younger ones who tend to prescribe good
style) is a fairly immediate "don't use bare excepts". So
endorsing this "silence" syntax would be tantamount to condoning
bare excepts. I'm not sure you'll find much support.
http://www.google.com/search?q=site%3Amail.python.org+%22bare+excepts%22
(I've had problems with Google finding all posts to c.l.p on
m.p.o recently, so this may only be a recent representative sample)
-tkc
More information about the Python-list
mailing list