assignment expression peeve

Alexander Schmolck a.schmolck at gmx.net
Wed Oct 15 19:34:28 EDT 2003


Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:

> 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.

Sure, it's also no big deal that the C software I have to uses segfaults every
now and then (I'm sure the spec says so somewhere). Users live with that.

'as




More information about the Python-list mailing list