[issue1408] Inconsistence in multiply list

2007-11-09 Thread Georg Brandl
Georg Brandl added the comment: I'm sorry, this is no bug. List multiplication works by referencing, there is no way to implement it differently in a straightforward way. Note that in >>> [a[:]] + [a[:]] the expression "a[:]" is evaluated twice, yielding two independent copies of a. In contrast,

[issue1408] Inconsistence in multiply list

2007-11-08 Thread beco
New submission from beco: There is no way to create a big nested list without references using the multiplication operator. '*' is supposed to work like + ... + in this cases: >>> a=[0, 0] >>> b=[a[:]]+[a[:]] >>> b [[0, 0], [0, 0]] >>> b[0][0]=1 >>> b [[1, 0], [0, 0]] Ok! Copy here, not refere

[issue1408] Inconsistence in multiply list

2007-11-08 Thread beco
Changes by beco: -- components: Interpreter Core nosy: beco severity: major status: open title: Inconsistence in multiply list type: behavior versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> __