simultaneous assignment

John Salerno johnjsal at NOSPAMgmail.com
Wed May 3 12:06:51 EDT 2006


bruno at modulix wrote:
> John Salerno wrote:
>> Bruno Desthuilliers wrote:
>>
>>> 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 ?". 
>>
>> 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! :)
> 
> something
> a = b = []
> a.append(1)
> print b
> 
> 

Ah ha!



More information about the Python-list mailing list