New submission from muzuiget <muzui...@gmail.com>: platform: ubuntu 10.04 amd64, python 2.6.5 r265:79063
run below code a = [{}, {}, {}] b = [{}] + [{}] + [{}] c = [{}] * 3 print a, len(a), type(a) print b, len(b), type(b) print c, len(c), type(c) a[1]["test"] = 1234 b[1]["test"] = 1234 c[1]["test"] = 1234 print a print b print c the output is [{}, {}, {}] 3 <type 'list'> [{}, {}, {}] 3 <type 'list'> [{}, {}, {}] 3 <type 'list'> [{}, {'test': 1234}, {}] [{}, {'test': 1234}, {}] [{'test': 1234}, {'test': 1234}, {'test': 1234}] each dict key in variable c seen to assign with the same value. ---------- components: None messages: 108872 nosy: muzuiget priority: normal severity: normal status: open title: list object variable assign with multiplication sign type: compile error versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9108> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com