why no ++?

Bengt Richter bokr at accessone.com
Fri Aug 17 23:54:53 EDT 2001


On Tue, 14 Aug 2001 10:20:50 +0200, "Alex Martelli" <aleax at aleax.it> wrote:

>"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?
>
>
Considering your proposed example, can you state with assurance
exactly what order things are done, including side effects?





More information about the Python-list mailing list