I am using python 2.7.10 from Anaconda 2.2.0, on Ipython Notebook, and am observing the following apparent bug (see code below). The same operation on two equivalent lists produces two unequivalent lists. If it is intended that the two lists are supposed to behave differently because of the different ways that they are initiated, then an equality comparison of the two lists should not evaluate to True (because A == B <=> F(A) == F(B)) . To my mind, this must be a bug either in the list object definition, or the equality operator implementation. Can somebody please confirm that this is a bug and tell me the best way to call this to the community's attention?
> test = [[]]*3
> testtwo = [[],[],[]]
> print(test)
> print(testtwo)
> print(test==testtwo)
[[], [], []]
[[], [], []]
True
> test[1].append(2)
> testtwo[1].append(2)
> print(test)
> print(testtwo)
> print(test==testtwo)
[[2], [2], [2]]
[[], [2], []]
False