Compare two points for sorting (bottom-most, then left-most). >>> Point(1, 2) < Point(1, 3) True >>> Point(1, 2) < Point(2, 2) True >>> Point(2, 2) < Point(1, 2) False
(self, other: Point)
| 63 | return self.x == other.x and self.y == other.y |
| 64 | |
| 65 | def __lt__(self, other: Point) -> bool: |
| 66 | """ |
| 67 | Compare two points for sorting (bottom-most, then left-most). |
| 68 | |
| 69 | >>> Point(1, 2) < Point(1, 3) |
| 70 | True |
| 71 | >>> Point(1, 2) < Point(2, 2) |
| 72 | True |
| 73 | >>> Point(2, 2) < Point(1, 2) |
| 74 | False |
| 75 | """ |
| 76 | if self.y == other.y: |
| 77 | return self.x < other.x |
| 78 | return self.y < other.y |
| 79 | |
| 80 | def euclidean_distance(self, other: Point) -> float: |
| 81 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected