Warning of missing side effects
Dave Angel
davea at ieee.org
Sat May 2 11:32:02 EDT 2009
Arnaud Delobelle wrote:
> Dave Angel <davea at ieee.org> writes:
>
>
>> Python allows multiple assignments in the same statement, but they're
>> all to the same object.
>>
>
> Unless they are to different objects:
>
> a, b = 1, 2
>
>
You're right, of course. I was referring to the multiple '=' form, and
my statement was too general to be correct.
a = b = 42 is legal
a = (b=42) + 1 is not
More information about the Python-list
mailing list