Stef Mientki wrote:
hello,

I can assign a value to more than 1 variable (name) in one line:

a = b = 3

So evaluation of this line must start at the right part.

But the following is not allowed:

b = 2
a = b += 1

This strikes me as slightly incoherent. Given that v op=exp is mostly that same as v = v op exp, I suppose you expect a = b += 1 to be mostly the same as a = b = b+1, but what would you do with a += b = 1, or even a *= b += 1. There is some virtur to restricting augmented assignment to one target and one delimiter. Even that seems to cause some trouble.

tjr

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to