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


Groups > comp.lang.python > #93683

Re: 0 + not 0

Newsgroups comp.lang.python
Date 2015-07-11 06:22 -0700
References (2 earlier) <55a0fa36$0$2935$e4fe514c@news.xs4all.nl> <mailman.417.1436613616.3674.python-list@python.org> <55a0fe55$0$2875$e4fe514c@news.xs4all.nl> <57a9e100-5783-4d95-bb41-f1d19e757c16@googlegroups.com> <mailman.419.1436616312.3674.python-list@python.org>
Message-ID <2db325c6-e9b2-4474-b2e9-e82dbf18647e@googlegroups.com> (permalink)
Subject Re: 0 + not 0
From candide <c.candide@laposte.net>

Show all headers | View raw


Le samedi 11 juillet 2015 14:05:58 UTC+2, Chris Angelico a écrit :

> You'll see down below a footnote referring to this as a special case.

I didn't spot the footnote and I don't regard it as dealing with a "special case": the footnote is paraphrasing the precedence hierarchy given by the table. I  see it more as a glose (operator exponentiation is not so common in programming languages) or, better, a warning because precedence of unary minus is "between" two "multiplicative" operators (** and *).

By the way, example provided by the doc in this footnote doesnt't properly illustrate the precedence of ** versus unary minus : whatever the precedence is, there is only one way to evaluate 2**-1. On the opposite, -1**2 (for instance) leads to two evaluations : (-1)**2 and -(1**2) and would provide an appropriate and better example.



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