Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32249
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jeanpierreda@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.007 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'example:': 0.03; 'lines,': 0.05; 'expressions': 0.07; 'received:mail-qc0-f174.google.com': 0.09; 'subject:while': 0.09; 'cc:addr:python-list': 0.10; 'oct': 0.16; 'simpson': 0.16; 'subject:expression': 0.16; 'wrote:': 0.17; 'define': 0.20; 'cc:2**0': 0.23; 'example': 0.23; 'this:': 0.23; 'second': 0.24; 'so.': 0.24; 'cc:addr:python.org': 0.25; 'header :In-Reply-To:1': 0.25; 'first,': 0.27; 'right.': 0.27; 'separate': 0.27; 'message-id:@mail.gmail.com': 0.27; 'arithmetic': 0.29; 'though.': 0.29; 'skip:_ 10': 0.29; 'evaluation': 0.30; 'fri,': 0.30; 'point,': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'does': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'gives': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'safe': 0.63; 'more': 0.63; '26,': 0.65; 'actually,': 0.84; 'sorry.': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=54hEw/JOgcWT/I52mOJmMGP9pYCedBFpb8KvdBWICtE=; b=VJjNcAyuBaEIytv9APpJKfirSPa2I9PPRogFOyMMoqJ1Xf1OYWMDHSbpJb+YgXsfqX U7d99B2olcmSJiG/Bog7PPizj9mv9xGiEe3DAj627rwZQl0FnGJ241iQaZQXEyHZUzWC hYBlahprToppfKd3xr5IyLJN5AKKCitQ7sch5r1/pDAh1iFDiKdAtYBTl5DIZTgusO6N 5yTlJ/O5yXf2d8seuYi3gro5E7DXkYCoq2FHVxIaIeYCaEccyF54T0eOSiJccCbkLIZP ZZxWPZ0t3mAfZ4vT/QNoUWmhMENR4H3+ebo1wWwKm42OG1Gg5yk9FIMUoHS6/WLhy3Y0 eMjA== |
| MIME-Version | 1.0 |
| In-Reply-To | <20121026235601.GA32598@cskk.homeip.net> |
| References | <CABicbJJkbK4fop0GSb2bofMu1_6X0vVgku4bo1O51b63S0A5ZQ@mail.gmail.com> <20121026235601.GA32598@cskk.homeip.net> |
| From | Devin Jeanpierre <jeanpierreda@gmail.com> |
| Date | Fri, 26 Oct 2012 19:59:06 -0400 |
| Subject | Re: while expression feature proposal |
| To | Cameron Simpson <cs@zip.com.au> |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | "comp.lang.python" <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2920.1351295989.27098.python-list@python.org> (permalink) |
| Lines | 26 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1351295989 news.xs4all.nl 6849 [2001:888:2000:d::a6]:55997 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:32249 |
Show key headers only | View raw
On Fri, Oct 26, 2012 at 7:56 PM, Cameron Simpson <cs@zip.com.au> wrote:
> No. Separate _expressions_ are evaluated left to right.
>
> So this:
>
> f(1), f(2)
>
> calls "f(1)" first, then "f(2)". But this:
>
> f(1) + f(2)
>
> need not do so. Counter-documentation welcomed, but the doco you cite
> does not define an order for the second example above.
Actually, it does. Both f(1) and f(2) are separate (sub-)expressions
in f(1) + f(2). More to the point, it gives the following example:
In the following lines, expressions will be evaluated in the
arithmetic order of their suffixes:
...
expr1 + expr2 * (expr3 - expr4)
I sympathize with your concern, though. Order of evaluation is very
bitey, and it's better to be safe than sorry.
-- Devin
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: while expression feature proposal Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-26 19:59 -0400
csiph-web