[Python-ideas] except expression

Jan Kaliszewski zuo at chopin.edu.pl
Wed Feb 19 00:58:40 CET 2014


18.02.2014 16:13, MRAB wrote:

> Another possibility would be to say that a bare except in an 
> expression
> catches only certain "expression-oriented" exceptions, e.g. 
> ValueError.
> The simplest way to do that would be to make them subclasses of an
> ExpressionError class. The question then becomes one of which
> exceptions are "expression-oriented"...

I believe it is not a good idea -- as:

* Explicit is better than implicit™.

* When dealing with exceptions, catching too much is in fact much worse 
than catching too little (at least most often).

Cheers.
*j



More information about the Python-ideas mailing list