"Dick Moores" <[EMAIL PROTECTED]> wrote

>  > Tim Peters ("Explicit is better than implicit"), isn't "if 
> lapTimeFlag ==
>  > True" preferable?
>
>    if (lapTimeFlag == True) == True:
>
> Well, how about "Readability counts"?

Thats the point.
By calling the variable a "Flag" you are implying that
it is a boolean that can only be True/False thus

if Flag:

is completely readable. There is no need for the == True part.

The same is true of a predicate function. By naming it
isXXX you imply that it is a predicate and returns True/False
so you can write

if isXXX():

rather than

if isXXX() == True:


HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to