Re: simultaneous assignment
bruno at modulix wrote:[color=blue]
> John Salerno wrote:[color=green]
>> Bruno Desthuilliers wrote:
>>[color=darkred]
>>> But my question (sorry, it may not have been clear) was more along the
>>> line of : "why do you worry about identity in the given snippet ?".[/color]
>>
>> Actually, I kind of thought that maybe it *didn't* matter in this
>> particular example anyway, so my question was meant to be more general
>> than I might have written it. It seems like the identity issue can be a
>> problem in certain cases, although I can't think of a case right now! :)[/color]
>
> something
> a = b = []
> a.append(1)
> print b
>
>[/color]
Ah ha!
bruno at modulix wrote:[color=blue]
> John Salerno wrote:[color=green]
>> Bruno Desthuilliers wrote:
>>[color=darkred]
>>> But my question (sorry, it may not have been clear) was more along the
>>> line of : "why do you worry about identity in the given snippet ?".[/color]
>>
>> Actually, I kind of thought that maybe it *didn't* matter in this
>> particular example anyway, so my question was meant to be more general
>> than I might have written it. It seems like the identity issue can be a
>> problem in certain cases, although I can't think of a case right now! :)[/color]
>
> something
> a = b = []
> a.append(1)
> print b
>
>[/color]
Ah ha!
Comment