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.

Author jjhwoldringh
Recipients jjhwoldringh
Date 2020-01-17.12:55:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579265723.61.0.0732366373577.issue39368@roundup.psfhosted.org>
In-reply-to
Content
Python used:
Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
In Ubuntu 18.04.3

But in any other version of Python3, and Python2,  that I tried, the behaviour of a (square) matrix depends on how it is created; as I can demonstrate in a test program matrix_experiment.py that is attached to this report.

1. it behaves as expected when created by entering all it’s elements like so:
A = [[ 1,2,3],[1,2,3],[1,2,3]]

2. If it is created by appending predefined rows, it behaves as if all rows are the same as the last row:
row = [1,2,3]
B=[]
for i in range(3):
    B.appends(row)

The result matrix is the same as A:   [[1, 2, 3], [1, 2, 3], [1, 2, 3]]

Both results are equal:

print(A==B) gives True.

But when using B the result is disastrous as the attached matrix_experiment.py
program shows.

I consider this a very serious bug, and first filed it at Ubuntu’s Launchpad, but I don't find it there.
So now I file this again, at Python.org itself, using my new account.
History
Date User Action Args
2020-01-17 12:55:23jjhwoldringhsetrecipients: + jjhwoldringh
2020-01-17 12:55:23jjhwoldringhsetmessageid: <1579265723.61.0.0732366373577.issue39368@roundup.psfhosted.org>
2020-01-17 12:55:23jjhwoldringhlinkissue39368 messages
2020-01-17 12:55:23jjhwoldringhcreate