Interest check in some delicious syntactic sugar for "except:pass"

Chris Rebert clp2 at
Wed Mar 3 11:25:02 CET 2010

On Wed, Mar 3, 2010 at 1:27 AM, Oren Elrad <orenelrad at> wrote:
> Howdy all, longtime appreciative user, first time mailer-inner.
> I'm wondering if there is any support (tepid better than none) for the
> following syntactic sugar:
> silence:
> ........ block
> ------------------------->
> try:
> ........block
> except:
> ........pass
> The logic here is that there are a ton of "except: pass" statements[1]
> floating around in code that do not need to be there.

So, why exactly should the language /encourage/ unnecessary error
silencing? (which is what the proposed sugar would do)

> I appreciate any feedback

Applicable rules of The Zen[1] that the proposal arguably violates:
*Special cases aren't special enough to break the rules.
*There should be one-- and preferably only one --obvious way to do it.



More information about the Python-list mailing list