Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93721
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: 0 + not 0 |
| Date | 2015-07-12 18:12 +1200 |
| Message-ID | <d0eepiFo9spU1@mid.individual.net> (permalink) |
| References | <01ec6551-1f40-42b0-9406-036030591519@googlegroups.com> <mailman.420.1436621919.3674.python-list@python.org> <not-20150711180044@ram.dialup.fu-berlin.de> <mailman.428.1436633811.3674.python-list@python.org> |
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
0 + not 0 candide <c.candide@laposte.net> - 2015-07-11 03:26 -0700
Re: 0 + not 0 Chris Angelico <rosuav@gmail.com> - 2015-07-11 20:38 +1000
Re: 0 + not 0 Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-07-11 12:38 +0200
Re: 0 + not 0 Luuk <luuk@invalid.lan> - 2015-07-11 13:12 +0200
Re: 0 + not 0 Chris Angelico <rosuav@gmail.com> - 2015-07-11 21:20 +1000
Re: 0 + not 0 Luuk <luuk@invalid.lan> - 2015-07-11 13:30 +0200
Re: 0 + not 0 candide <c.candide@laposte.net> - 2015-07-11 04:54 -0700
Re: 0 + not 0 Chris Angelico <rosuav@gmail.com> - 2015-07-11 22:05 +1000
Re: 0 + not 0 candide <c.candide@laposte.net> - 2015-07-11 06:22 -0700
Re: 0 + not 0 candide <c.candide@laposte.net> - 2015-07-11 04:48 -0700
Re: 0 + not 0 random832@fastmail.us - 2015-07-11 16:46 -0400
Re: 0 + not 0 Serhiy Storchaka <storchaka@gmail.com> - 2015-07-11 16:38 +0300
Re: 0 + not 0 candide <c.candide@laposte.net> - 2015-07-11 08:07 -0700
Re: 0 + not 0 MRAB <python@mrabarnett.plus.com> - 2015-07-11 17:20 +0100
Re: 0 + not 0 Ian Kelly <ian.g.kelly@gmail.com> - 2015-07-11 10:56 -0600
Re: 0 + not 0 Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-07-12 18:12 +1200
Re: 0 + not 0 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-11 21:05 +0100
csiph-web