On 2007-10-25, Tim Williams <[EMAIL PROTECTED]> wrote:
> On 25/10/2007, A.T.Hofkamp <[EMAIL PROTECTED]> wrote:
>> On 2007-10-25, Pete Bartonly <[EMAIL PROTECTED]> wrote:
>> >
>> Also, brackets around conditions (in the if) are not needed, and comparing
>> against None is usually done with 'is' or 'is not' instead of '==' or '!='.
>> The result is then
>>
>> if logMsg is not None:
>
> Or just
>
>>>>  if logMsg:
>             do_something()
>
>:)

That is not the same.

If logMsg is 0, False, or empty string, the second variant
would be False and not True.

Albert
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to