why no ++?
aleax at aleax.it
Tue Aug 14 10:20:50 CEST 2001
"Michael Abbott" <michael at rcp.co.uk> wrote in message
news:Xns90FD5728D9CDAmichaelrcpcouk at 220.127.116.11...
> Oops! Very true. I should have rewritten it as
> e = 'wow'
> b,c,d = 'wow'
> a = 'wow'
> Hmm. The argument about obfuscation versus repetition comes more clearly
> into focus. I still think multiple assignment is a bad thing...
So now consider:
y.a = b,c,d = x.e = wower()
How would you like to rewrite _this_?-) There is *NO* rewrite
that ensures constant semantics except by introducing _another_
temporary variable -- *yecch*!-)
Seriously now -- multiple assignment is a very minor thing, but
handy when you do need it, and not error-prone. So, why not?
More information about the Python-list