[Python-ideas] except expression

spir denis.spir at gmail.com
Fri Feb 14 08:41:23 CET 2014


On 02/13/2014 11:25 PM, Greg Ewing wrote:
> spir wrote:
>> [By the way, this shows that:
>>     x = b if cond else a
>> should really be:
>>     x = a else b if cond
>> The difference being that the standard case is expressed first, the
>> exceptional one being then introduced as an special variant.]
>
> I don't think it shows that at all. Which is the normal
> case and which is the exceptional one depends entirely
> on how the condition is expressed.

Say it differently: the condition should single out the special case, not the 
normal one;

d



More information about the Python-ideas mailing list