[Python-ideas] except expression

Paul Moore p.f.moore at gmail.com
Tue Feb 18 19:47:00 CET 2014


On 18 February 2014 18:30, Rob Cliffe <rob.cliffe at btinternet.com> wrote:
>> I remain less than happy with the colon notation, although I will
>> concede that the basic
>>
>>      x[3] except IndexError: 0
>>
>> form is not horrible - it just becomes horrible very, very fast when
>> people try to do anything more complicated than that.
>
> I guess this is a subjective thing, no point in shouting too much about it.
> But given that this notation is (about) the most compact for its generality,
> wouldn't any alternative become horrible even faster?

Not in my view, because I find keywords more readable than punctuation
in this case. But yes, it is subjective. Even to the point that my
bleary-eyed, pre-cup-of-tea early morning self has stronger views on
the matter than I do right now :-)

Paul


More information about the Python-ideas mailing list