assignment expression peeve
Paul Rubin
http
Wed Oct 15 18:40:08 EDT 2003
mwilson at the-wire.com (Mel Wilson) writes:
> More likely it's the dreaded sequence point problem,
> which, in its purest form, shows up in the C statement
>
> arry[i] = i++;
>
> where there's no obvious way to decide which element of arry
> is going to get the new value.
That's no big deal. The spec can explicitly say the order of
evaluation is not specified. In C,
a = f(g(x,y), h(z,w))
doesn't evaluate its args in a specified order either. You don't know
whether g or h will be called first. Programmers live with that.
More information about the Python-list
mailing list