[Python-ideas] except expression

Chris Angelico rosuav at gmail.com
Thu Feb 20 17:22:18 CET 2014


On Fri, Feb 21, 2014 at 3:05 AM, Andrew Barnert <abarnert at yahoo.com> wrote:
> I suspect a lot of people will miss it buried in the middle of this gigantic thread.

It is, a bit :) Gmail breaks the thread automatically when it hits 100
emails... and it's done that four times so far (in the space of a
week, mark you, so that's 60 emails a day average).

I'd like to get back to the topic at hand, if we can, so I'll ask this
question again. Which do you prefer, out of these?

    value = expr except Exception -> default
    value = expr except Exception: default

Reasons are preferred over mere preferences, but the latter have value
too. And hating both is acceptable; so far, none of the keyword-only
options has snowballed in support, but "expr except Exception pass
default" and "expr except Exception then default" are probably the
front runners in the "no new keywords" and "one new keyword"
categories.

ChrisA


More information about the Python-ideas mailing list