R. David Murray <rdmur...@bitdance.com> added the comment: I'm not quite sure from what you wrote if you understood. Just to make sure no one reading this ticket later gets confused: it works the same way for all objects, and the behavior that sometimes surprises people shows up with mutable objects. So lists and dicts behave the same way in this scenario:
>>> x = [[]]*3 >>> x [[], [], []] >>> x[0].append(1) >>> x [[1], [1], [1]] ---------- nosy: +r.david.murray _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7823> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com