> > flag = True if  (someValue or another) else False
> >
> I'd prefer the form:
>
>    flag = not not (someValue or another)

Eek! no I'd just cast to a bool:

    flag = bool(someValue or another)

but the if/else form has the Pythonic virtue of explicitness.

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

Reply via email to