On Tue, Feb 18, 2014 at 10:30 AM, Rob Cliffe
Sorry, but this seems to me to be a futile discussion. Expressions can contain functions. Functions can raise any exception they like. So evaluating an expression can raise any exception you care to name.
This is true, but it does not follow that you need to be able to catch "any exception you care to name" in the expression. Exceptions that are caused by conditions not obvious from the expression are better handled at a higher level. Let's focus on the main use cases. E.g. a better spelling for x = d.get(key, default) -> x = d[key] except default try: x = 1/y except ArithmeticError: x=0; -> x = 1/y except 0 etc. I would not mind x = 1/f(y) except 0 not catching a TypeError that may come from f(y) in most cases.