why no ++?

Alex Martelli aleax at aleax.it
Tue Aug 14 04:20:50 EDT 2001


"Michael Abbott" <michael at rcp.co.uk> wrote in message
news:Xns90FD5728D9CDAmichaelrcpcouk at 194.238.50.13...
    ...
> 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?


Alex






More information about the Python-list mailing list