[issue3072] Assignment to list of lists gives incorrect result

2008-06-09 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: This is not a bug. Please read about references in Python, and what this means: py> b=[0] py> a=[b,b] py> a[0] is a[1] True py> c=[[0],[0]] py> c[0] is c[1] False py> c[0] == c[1] True In short, there is only a single list stored in the v

[issue3072] Assignment to list of lists gives incorrect result

2008-06-09 Thread Steve Emmert
New submission from Steve Emmert <[EMAIL PROTECTED]>: This bug is explained in the attached file. The list of lists does not behave correctly when it is defined by the makeGrid function in the attached file. When attempting to set the value of one element, it actually sets multiple elements. T