On Fri, 05 Dec 2008 23:16:08 +1300, Lawrence D'Oliveiro wrote:

> In message <[EMAIL PROTECTED]>, Steven D'Aprano
> wrote:
> 
>> On Fri, 05 Dec 2008 13:27:35 +1300, Lawrence D'Oliveiro wrote:
>> 
>>> In message <[EMAIL PROTECTED]>, Cong
>>> Ma wrote:
>>> 
>>>> The "if ... != None" is not necessary...  "if PatchDatePat.search(f)"
>>>> is OK.
>>> 
>>> I don't do that.
>> 
>> Perhaps you should?
> 
> I prefer using explicitly Boolean values for conditions.

Perhaps you do, but there's no evidence of such in your post. 

bool(PatchDatePat.search(f) != None)

would be an "explicitly Boolean value". What you posted was an 
*implicitly* Boolean value, and not even guaranteed to be Boolean, as 
__ne__ can return any object it likes.

And yes, such a call to bool would be pointless.


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

Reply via email to