Check if two points are equal. >>> Point(1, 2) == Point(1, 2) True >>> Point(1, 2) == Point(2, 1) False
(self, other: object)
| 50 | self.y = float(y_coordinate) |
| 51 | |
| 52 | def __eq__(self, other: object) -> bool: |
| 53 | """ |
| 54 | Check if two points are equal. |
| 55 | |
| 56 | >>> Point(1, 2) == Point(1, 2) |
| 57 | True |
| 58 | >>> Point(1, 2) == Point(2, 1) |
| 59 | False |
| 60 | """ |
| 61 | if not isinstance(other, Point): |
| 62 | return NotImplemented |
| 63 | return self.x == other.x and self.y == other.y |
| 64 | |
| 65 | def __lt__(self, other: Point) -> bool: |
| 66 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected