why no ++?

Alex Martelli aleaxit at yahoo.com
Sat Aug 18 03:13:26 EDT 2001


"Bengt Richter" <bokr at accessone.com> wrote in message
news:3b7de709.3497459 at wa.news.verio.net...
    ...
> >    y.a = b,c,d = x.e = wower()
> >
> >How would you like to rewrite _this_?-)  There is *NO* rewrite

[which has been shown to be false, btw]

> Considering your proposed example, can you state with assurance
> exactly what order things are done, including side effects?

Sure -- Python guarantees left-to-right behavior of this statement.
First wower is called, then y.a is assigned, then b,c,d, then x.e, in this
order.  But of course it wouldn't be wise to rely on this!-)


Alex






More information about the Python-list mailing list