1 > 0 == True -> False

Roy Smith roy at panix.com
Thu Jan 30 13:56:42 EST 2014


On Thursday, January 30, 2014 10:09:03 AM UTC-5, Steven D'Aprano wrote:

>     E.g. `x+1 > 0 and y >= 5` is potentially as many as 9 distinct
>     items to keep in short-term memory. But bracketing some terms 
>     as in `(x+1 > 0) and (y >= 5)` can reduce that down to as few
>     as two items.

Yes, that's probably how I would write that, although, this is even simpler:

(x > -1) and (y >= 5)



More information about the Python-list mailing list