This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: list
Type: performance Stage:
Components: Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: mark.dickinson, nutregina
Priority: normal Keywords:

Created on 2009-09-19 14:58 by nutregina, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg92869 - (view) Author: kewlar (nutregina) Date: 2009-09-19 14:58
>>> a = [[0,0,0],[0,0,0],[0,0,0]]
>>> a
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
>>> a[1][1] = 1
>>> a
[[0, 0, 0], [0, 1, 0], [0, 0, 0]]
>>> b = [[0]*3]*3
>>> b
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
>>> b[1][1] = 1
>>> b
[[0, 1, 0], [0, 1, 0], [0, 1, 0]]
>>>
msg92870 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-09-19 15:05
This is not a bug in Python.  For general Python questions, please ask on 
comp.lang.python.

(If you weren't trying to report a bug in the first place, please could 
you explain your purpose in opening this issue.)
History
Date User Action Args
2022-04-11 14:56:53adminsetgithub: 51197
2009-09-19 15:05:52mark.dickinsonsetstatus: open -> closed

nosy: + mark.dickinson
messages: + msg92870

resolution: not a bug
2009-09-19 14:58:59nutreginacreate