[Python-ideas] except expression
Alexander Belopolsky
alexander.belopolsky at gmail.com
Tue Feb 18 16:26:05 CET 2014
On Tue, Feb 18, 2014 at 10:13 AM, MRAB <python at mrabarnett.plus.com> 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.
+1
>
> The question then becomes one of which
> exceptions are "expression-oriented"...
Here is my attempt to answer:
- ArithmeticError
- AttributeError
- LookupError
- TypeError ?
- ValueError ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140218/11b53127/attachment-0001.html>
More information about the Python-ideas
mailing list