Antoon Pardon wrote:

Maybe I'm going to be pedantic here, but I fear that your code won't
work with matrices. The problem is that multiplication is not
commutative with matrices. This means that matrices have two divisions a right
and a left division. A far as I know the "/" operator usaly implements
the left division while solving is done by using a right division.

So your code will probably fail when applied to matrices.

You're right in your general point, but usually division between matrices isn't defined at all because of this ambiguity. However the general point can still exist between `solveLeft` and `solveRight` functions which do something along the lines of a*b**-1 and a**-1*b. A single `solve`, of course, would choose one of these, and syntactically it might be quite reasonable to define matrix division that does one of these and have a single `solve` function that accomplishes it.

Therefore, the general point about polymorphism still stands.

--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
 San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
  It is human nature to think wisely and act foolishly.
   -- Anatole France
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to