[Python-Dev] Infix operators

Scott Dial scott+python-dev at scottdial.com
Fri Jul 25 00:06:10 CEST 2008


Sebastien Loisel wrote:
> Greg Ewing said:
>> I would actually be in favour of adding a matrix multiplication
>> operator
> 
> That would be helpful to me, for my students as well as my papers.
> 

Perhaps I'm nobody, but I think this would be ridiculous. Matrices are
not native objects to the language. There is no type(matrix). The notion
of what makes a Python object a matrix is a convention and to have
built-in operators dedicated to such objects makes no sense. There are
multiple ways to stuff matrices into Python. Please submit a PEP for a
type(matrix) first. Until a matrix is a first-order object in Python,
there is no logic to making operators for them.

-Scott

-- 
Scott Dial
scott at scottdial.com
scodial at cs.indiana.edu


More information about the Python-Dev mailing list