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


Groups > comp.lang.python > #93683

Re: 0 + not 0

X-Received by 10.13.203.13 with SMTP id n13mr33700906ywd.40.1436620971447; Sat, 11 Jul 2015 06:22:51 -0700 (PDT)
X-Received by 10.140.47.68 with SMTP id l62mr403006qga.42.1436620971400; Sat, 11 Jul 2015 06:22:51 -0700 (PDT)
Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!z61no287401qge.0!news-out.google.com!w15ni32431qge.0!nntp.google.com!e109no229861qge.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Sat, 11 Jul 2015 06:22:51 -0700 (PDT)
In-Reply-To <mailman.419.1436616312.3674.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=82.245.68.143; posting-account=J_U-0woAAACrUCMCI_QdLAKny8A2zeDX
NNTP-Posting-Host 82.245.68.143
References <01ec6551-1f40-42b0-9406-036030591519@googlegroups.com> <55a0f241$0$2933$e4fe514c@news2.news.xs4all.nl> <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>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <2db325c6-e9b2-4474-b2e9-e82dbf18647e@googlegroups.com> (permalink)
Subject Re: 0 + not 0
From candide <c.candide@laposte.net>
Injection-Date Sat, 11 Jul 2015 13:22:51 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.python:93683

Show key headers only | 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