why is this invalid b = a += b ?

2009-01-24 Thread Stef Mientki
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 I would think that if b has a value, and the formula is evaluated from right to left, there's nothing

Re: why is this invalid b = a += b ?

2009-01-24 Thread MRAB
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 I would think that if b has a value, and the formula is evaluated from right to

Re: why is this invalid b = a += b ?

2009-01-24 Thread Terry Reedy
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