I have been reading everyone's comments on my line class. I have decided to
implement some of the suggestions. Someone suggested that I create a
Point.__cmp__ method. Here is what I have so far:
def __cmp__(self, other):
if self.x == other.x and self.y == other.y:
return 0
elif self.x < other.x and self.y < other.y:
return -1
elif self.x > other.x and self.y > other.y:
return 1
Figuring out the results for the above situations was easy. However, what
should I do with the following situations:
self.x > other.x and self.y < other.y
self.x < other.x and self.y > other.y
Thanks.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor