[Python-ideas] except expression
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Feb 20 03:54:50 CET 2014
On 20/02/14 02:01, Paul Moore wrote:
> EXPR except EXCEPTION return FALLBACK
>
> Here, EXPR is the "expected" result, but if you get EXCEPTION when
> evaluating it then use FALLBACK instead.
I don't think there's any point in forcing things
to be in the same order as the if-expression if it requires
mangling English grammar.
The reason we ended up with the oddly-ordered if-expression
in the first place is that it *avoided* mangled English while
staying within the existing set of keywords.
To introduce another construct that mangles English and/or abuses
keywords just to match the odd ordering of the if-expression
would be a truly foolish consistency.
--
Greg
More information about the Python-ideas
mailing list