-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Currently, it is not possible to compare two points.
a = Point(0, 0)
b = Point(0, 0)
a == b
> False
It would be useful to have this functionality.
def __richcmp__(Point self, Point other, int operation):
if operation == 2:
return self.x == other.x and self.y == other.y
elif operation ==3:
return self.x != other.x or self.y != other.y
else:
...
More info at: http://docs.cython.org/src/userguide/special_methods.html#rich-comparisons
I can write it, after my previous PR is merged.
Metadata
Metadata
Assignees
Labels
No labels