Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93703

Re: 0 + not 0

From random832@fastmail.us
References <01ec6551-1f40-42b0-9406-036030591519@googlegroups.com> <55a0f241$0$2933$e4fe514c@news2.news.xs4all.nl> <55a0fa36$0$2935$e4fe514c@news.xs4all.nl> <CAPTjJmpS84LFOmDDKrnnUag9jBZXve3AOtNjA3op_RUJRkyoiQ@mail.gmail.com>
Subject Re: 0 + not 0
Date 2015-07-11 16:46 -0400
Newsgroups comp.lang.python
Message-ID <mailman.434.1436647599.3674.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Jul 11, 2015, at 07:20, Chris Angelico wrote:
> On Sat, Jul 11, 2015 at 9:12 PM, Luuk <luuk@invalid.lan> wrote:
> > It can occur in an arithmetic expression, and 'not' has a higher precedence
> > than '+'
> > (https://docs.python.org/2/reference/expressions.html#operator-precedence)
> >
> 
> I think you're misreading the table; 'not' has *lower* precedence than
> '+'.

Precedence shouldn't actually matter when resolving a unary prefix
operator on the right of a binary operator. I don't understand how this
could possibly be interpreted in a different valid way rather than being
spuriously rejected as a syntax error.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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