| 1 | class D: |
| 2 | def __init__(self, x, y, z=None): |
| 3 | self.x = x |
| 4 | self.y = y |
| 5 | self.z = z if z is not None else 0 |
| 6 | |
| 7 | def __str__(self): |
| 8 | return f"D({self.x}, {self.y}, {self.z})" |
| 9 | |
| 10 | def __add__(self, rh): |
| 11 | return D(self.x + rh.x, self.y + rh.y, self.z + rh.z) |
| 12 | |
| 13 | def __eq__(self, rh): |
| 14 | return self.x == rh.x and self.y == rh.y and self.z == rh.z |
| 15 | |
| 16 | |
| 17 | if __name__ == "__main__": |
no outgoing calls
no test coverage detected