[sage-support] Strange behaviour for two similar functions

2013-06-07 Thread B. Zhang
Hi, How to explain the difference between these two similar functions ? Thansk. = Test 1 F = [1,2,3] def test1(F): F[0] = 0 F[1] = 0 F[2] = 0 print F test1(F); F [0, 0, 0] [0, 0, 0] === Test 2 === F = [1,2,3] def test2(F): F = [0,0,0] test2(F); F [0,

[sage-support] Re: Strange behaviour for two similar functions

2013-06-07 Thread B. Zhang
OK. Thanks. On Friday, June 7, 2013 10:24:25 AM UTC+2, B. Zhang wrote: Hi, How to explain the difference between these two similar functions ? Thansk. = Test 1 F = [1,2,3] def test1(F): F[0] = 0 F[1] = 0 F[2] = 0 print F test1(F); F [0, 0, 0] [0, 0, 0