Code basics

Grant Edwards nobody at nowhere.nohow
Tue Mar 21 00:10:55 EST 2000


On 17 Mar 2000 14:29:36 -0500, Alex <alex at somewhere.round.here> wrote:
>
>> Why should the return value of a logic test be "obscure" knowledge?
>
>The return value itself is not terribly obscure, but your code's
>reliance on it is relatively obscure, compared with something like
>
>if predicate:
>    result = true_value
>else:
>    result = false_value
>
>I can understand the intent of this immediately, whereas with your code,
>I had to think for a moment about what the results of your code could
>be, and then determine the intent.
>
>> Why "hide" something so basic?
>
>It's not a question of information hiding, it's question of clarity.

Right, it's not a question of information hiding, it's a
question of intent hiding.

-- 
Grant Edwards                   grante             Yow!  I'm definitely not
                                  at               in Omaha!
                               visi.com            



More information about the Python-list mailing list