[issue8023] bug in s.append(x)

2010-02-26 Thread ughacks
New submission from ughacks ugha...@yahoo.com: Dear, I am using $ python -V Python 2.6.4 on Ubuntu 9.10 I met a serious bug in s.append(x) operation. If I append a list into another list, there is a change of content. In the following code, [2,-2,0,0] is replaced with [-2,-2,0,0] after

[issue8023] bug in s.append(x)

2010-02-26 Thread ughacks
ughacks ugha...@yahoo.com added the comment: Thank you for kind explanation. So s.append(x) just copies the pointer, not the actual value. It is a little tricky to know that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org