25 Mar
2002
25 Mar
'02
10:53 a.m.
Milos Prudek wrote:
I think I'm going slightly mad :-)
OK, I tracked it down to what amounts to IMHO a Python feature :-O
x=['a','b','c'] x ['a', 'b', 'c'] y=x y ['a', 'b', 'c'] y.remove('b') y ['a', 'c'] x ['a', 'c']
This problem applies to lists only... a simple assignment seems to assign a reference to original variable instead of creating a copy of original variable data. I use Python 2.1.1 on Linux. Is this normal Python behaviour? -- Milos Prudek