[Python-ideas] except expression

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


On 18 February 2014 12:49, MRAB <python at mrabarnett.plus.com> wrote:
>> I really think that this proposal needs to focus on the short, simple
>> use cases and *not* worry about too much generality. For example:
>>
>>     sum(x[3] except 0 for x in list_of_tuples)
>>
> Shouldn't that be:
>
>
>     sum(x[3] except: 0 for x in list_of_tuples)
>
> (colon added)?

Only if you feel that a colon is necessary for the syntax. I don't :-)

Paul.


More information about the Python-ideas mailing list