[Python-ideas] except expression

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Feb 18 22:42:19 CET 2014


Paul Moore wrote:
> I could argue that
> "bare except" is more acceptable in an *expression* context because
> expressions should never be so complex that the reasons why it's bad
> in a statement context actually apply.

The expression itself doesn't have to be complicated.
Even a simple expression such as x[i] can invoke arbitrary
code, and therefore raise arbitrary exceptions, including
ones that represent bugs and therefore shouldn't be
silenced.

-- 
Greg


More information about the Python-ideas mailing list