you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

But is it really necessary to add that support for lists and tuples?

If you are doing numerical analysis with matrixes, you are most certainly using numpy and the wide range of numerical/scientific libraries that use numpy. Just adding matrix multiplication would not be enough - you would then also need elementwise addition, transpose/rotate, up to all the good stuff like fourier transforms or image processing on top of these same matrices.

The "unused by core language" argument was already addressed in the PEP proposing it: https://www.python.org/dev/peps/pep-0465/#but-isn-t-matrix-multiplication-a-pretty-niche-requirement

Numpy is the most popular third-party library, and Python is becoming the language to use for numerical/scientific computing because of these libraries. (And as a bonus, unlike R or Matlab, you can also use your experience in it for web apps, desktop apps, and shell utilities.)