Request for feedback on my first Python program

Sean Legassick sean at datamage.net
Sun Jun 1 11:21:50 EDT 2003


In message <3ED97F63.4045FBAD at alcyone.com>, Erik Max Francis 
<max at alcyone.com> writes
>Sean Legassick wrote:
>
>> I specifically wanted to point out that
>>
>> if X:
>>    return True
>> else:
>>    return False
>>
>> is a particularly ugly and surprisingly common redundancy - in many
>> languages...
>
>What you write here is not necessarily redundant, provided that X is not
>a Boolean.  There may be more compact ways to write it, but that doesn't
>mean that the above code is wrong.

Uh-huh, point taken. I was thinking of the case where X evaluates out to 
a boolean, as in the previous example.

-- 
Sean K. Legassick
sean at datamage.net
         informage - http://informage.net - mouthing off from the fairest cape






More information about the Python-list mailing list