[Python-ideas] except expression

Paul Moore p.f.moore at gmail.com
Wed Feb 19 08:25:13 CET 2014


On 19 February 2014 00:10, Steven D'Aprano <steve at pearwood.info> wrote:
> x = d1[key] except K d2[key] except K 0
>
>
> which by the way looks horrible without the colons (sorry Paul, you have
> not convinced me that the Tim Peters prohibition on grit applies here).

While I did say later on yesterday that I'd become less uncomfortable
with the except Whatever: form, I was never advocating just removing
the colons - pick your favourite keyword-based proposal and compare
with that if you want to see what I was talking about.

But that ship has sailed, for better or worse, and it looks like the
except-colon form is the winner. So be it.

Paul


More information about the Python-ideas mailing list