[Tutor] Misc question about scoping

Dave Angel davea at ieee.org
Fri Jun 4 13:23:39 CEST 2010


Alan Gauld wrote:
> <snip>
>
> flag = True if  (smoeValue or another) else False
>
> is different to
>
> flag = someValue or another
>
> Which was why I thought it worth pointing out that the if/else
> could be used.
>
>
I'd prefer the form:

   flag = not not (someValue or another)

if I needed real True or False result.


DaveA



More information about the Tutor mailing list