Ian Kelly wrote:
I must concur. The grammar as written does not actually produce 1 +
not 0. I think it's still worthwhile opening a bug, because the
behavior is surprising and possibly not intentional.

It's almost certainly intentional. If you want

   not a + b > c

to be interpreted as

   not (a + b > c)

rather than

   (not a) + b > c

then 'not' has to be higher up in the chain of
grammar productions than the arithmetic operations.
Maintaining that while allowing 'a + not b' would
require contortions in the grammar that wouldn't be
worth the very small benefit that would be obtained.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to