Re: while expression feature proposal

Discussion in 'Python' started by Cameron Simpson, Oct 27, 2012.

  1. On 27Oct2012 10:56, I wrote:
    | On 26Oct2012 19:41, Devin Jeanpierre <> wrote:
    | | But function calls with side effects _do_ have a defined order of
    | | evaluation. Left to right.
    | | And the answer should be 4.
    | | http://docs.python.org/reference/expressions.html#evaluation-order
    |
    | No. Separate _expressions_ are evaluated left to right.
    [...]
    | need not do so. Counter-documentation welcomed, but the doco you cite
    | does not define an order for the second example above.
    [...]

    On 26Oct2012 16:48, Ian Kelly <> wrote:
    | > does not have a defined answer; might be 2, might be 3. Just like any
    | > other function call with side effects.
    | Actually, the docs are clear that expressions are evaluated left to
    | right, so the expected result of the above would be 4.

    Ian, Devin, my apologies. You're right, the docs are clear and my brain
    is foggy. So, no ambiguity about that with the suggested "as" operator.
    --
    Cameron Simpson <>

    Well, if you didn't struggle so much, you wouldn't get rope burns.
    Cameron Simpson, Oct 27, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan Loewenherz

    while expression feature proposal

    Dan Loewenherz, Oct 24, 2012, in forum: Python
    Replies:
    1
    Views:
    143
    Paul Rubin
    Oct 24, 2012
  2. Ian Kelly
    Replies:
    0
    Views:
    124
    Ian Kelly
    Oct 24, 2012
  3. Tim Chase
    Replies:
    0
    Views:
    143
    Tim Chase
    Oct 24, 2012
  4. Cameron Simpson

    Re: while expression feature proposal

    Cameron Simpson, Oct 24, 2012, in forum: Python
    Replies:
    6
    Views:
    153
    Thomas Rachel
    Oct 25, 2012
  5. Chris Angelico

    Re: while expression feature proposal

    Chris Angelico, Oct 24, 2012, in forum: Python
    Replies:
    0
    Views:
    168
    Chris Angelico
    Oct 24, 2012
Loading...

Share This Page