[Tutor] operators

Isaac Hall hall@ouhep1.nhn.ou.edu
Thu Mar 27 11:51:01 2003


Hi list,

Im wondering if anyone can tell me how to define an operator to work on 
multiple types.  In my case Im trying to construct a class for matricies 
and I would like to define matrix multiplication to either multiply 2 
matricies or to multiply a matrix by a scalar depending on what is given 
in the argument.  also, if someone can correct me if I am wrong, to 
redifine multiplication in a class, I must use:
def __*__(self,a):
	blah

right?

anyway, any help would be hot

thanks

Ike

--