(self, other)
| 40 | return hash((self.x, self.y)) |
| 41 | |
| 42 | def __add__(self, other) -> Self: |
| 43 | if isinstance(other, Point): |
| 44 | return Point(self.x + other.x, self.y + other.y) |
| 45 | else: |
| 46 | raise TypeError |
| 47 | |
| 48 | def taxi_distance(self, other) -> int: |
| 49 | return abs(self.x - other.x) + abs(self.y - other.y) |