Newbie: Classes

KefX keflimarcusx at aol.comNOSPAM
Mon Oct 27 02:07:04 EST 2003


>Yeah, that's right. Do it like this instead:
>def __mul__(self, m):
>  r *= m
>  i *= m
>  return Complex(r, m)

err...I meant this for the last line:
return Complex(r, i)

- Kef




More information about the Python-list mailing list