[issue29584] 2D list with Bugs when defined by using Multiplication

2017-02-16 Thread Yaowei Zhang
New submission from Yaowei Zhang: #If we define a list by: nums = [[0]*3]*3 #nums = [[0,0,0],[0,0,0],[0,0,0]] nums[0][1] = 1 print(mums) # the result is [[0,1,0],[0,1,0],[0,1,0]] #I think it is because all the line use the same list variable, but it suppose #not. -- components: +Build

[issue29584] 2D list with Bugs when defined by using Multiplication

2017-02-16 Thread Yaowei Zhang
Changes by Yaowei Zhang : -- components: Library (Lib) nosy: Yaowei Zhang priority: normal severity: normal status: open title: 2D list with Bugs when defined by using Multiplication versions: Python 3.5 ___ Python tracker <http://bugs.python.