Re: a + not b

2021-03-03 Thread MRAB
On 2021-03-04 03:39, Avi Gross via Python-list wrote: As a guess, Rob, precedence rules for not may not bind as strongly as you think. 1 + (not 1) With parentheses, "not 1" is a subexpression that should be performed first and might return the value "False" 1 + False treats False in a numeri

RE: a + not b

2021-03-03 Thread Avi Gross via Python-list
As a guess, Rob, precedence rules for not may not bind as strongly as you think. 1 + (not 1) With parentheses, "not 1" is a subexpression that should be performed first and might return the value "False" 1 + False treats False in a numeric context as a zero so evaluates to 1. But 1 + not 1