Terry Hancock wrote: > def __add__(a,b): > return Vector((a.x+b.x), (a.y+b.y), (a.z+b.z)) > > or something like that. I still have twinges of guilt about it, > though, and I had to write a long note in the comments, apologizing > and rationalizing a lot. ;-)
Assigning self to a could have made it obvious: def __add__(self, b): a = self return Vector((a.x+b.x), (a.y+b.y), (a.z+b.z)) -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list