PEP-308 a "simplicity-first" alternative

Bengt Richter bokr at oz.net
Sun Feb 16 17:58:31 EST 2003


On Sun, 16 Feb 2003 08:12:10 -0800, Erik Max Francis <max at alcyone.com> wrote:

>Jp Calderone wrote:
>
>>   And Terry meant that if you think that 1.1 is the same as eleven
>> tenths,
>> then you are mistaken.
>> 
>>   The parallel seems perfectly valid to me.
>
>The problem with the parallel is that some people are using the and/or
>trick _as if_ it were a conditional operator; they've elevated it to an
>idiom, but it's a broken idiom.
Since the operators do exactly what they were designed to do, IMO "broken"
is misleading. The _idiom_ has a pitfall which is well known to some, but
perhaps not to most. The fact that even experts fall into it occasionally
shows its danger, but dangerous is not the same as broken IMO. Cf. C++ ;-)

>
>We've already seen several examples from the standard library (whether
>corrected later or not) that used the idiom incorrectly; we're well past
>the theoretical question of whether and/or can be misunderstood and
>misused.
True.

Regards,
Bengt Richter




More information about the Python-list mailing list