Op 2005-06-22, Michael Hoffman schreef <[EMAIL PROTECTED]>:
> Remi Villatel wrote:
>> Fredrik Lundh wrote:
>>> checking if a logical expression is true by comparing it to True is bad
>>> style, and comparing values using "is" is also bad style.
>> 
>> I wrote it this way because, first, it's perfectly valid Python code and,
> > second and most important, it's also a valid english sentence.
>
> As others have pointed out, it's not perfectly valid code. In fact it is 
> frequently incorrect.

That the same code would be incorrect in other circumstances doesn't
make it invalid as it was used in a specific situation.

I have written code my self with an "if var is True" statement and
that is exactly what I wanted. Replacing it with "if var" would
have broken the the program.

-- 
Antoon Pardon
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to