>>>>> James Stroud <[EMAIL PROTECTED]> (JS) wrote: >JS> def Multiply(self, other): >JS> self.a = self.a * other.a + self.b * other.b >JS> self.b = self.a * other.b + self.b * other.c >JS> self.c = self.b * other.b + self.c * other.c
I gues this will give the wrong result because the calculation of self.b is supposed to use the original value of self.a, not the newly calculated one. Similar for self.c. The following should do that: self.a, self.b, self.c = (self.a * other.a + self.b * other.b, self.a * other.b + self.b * other.c, self.b * other.b + self.c * other.c) -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list