Hugo Arts wrote:
On Fri, Jun 4, 2010 at 1:23 PM, Dave Angel <da...@ieee.org> wrote:
I'd prefer the form:

 flag =ot not (someValue or another)


That's a construct you might commonly find in languages like C, but I
don't think it's very pythonic. If you want to convert your result to
a bool, be explicit about it:

flag =ool(some_value or another)

I'd agree that the if/else construct is redundant if you just want a
True/False result, but the double not is a kind of implicit type
conversion that is easily avoided.

Hugo

I'd certainly agree that bool() is better than not not. And I admit a C background.

DaveA

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to