| 83 | |
| 84 | print("Example 4") |
| 85 | class BetterPoint2D(Deserializable): |
| 86 | def __init__(self, x, y): |
| 87 | super().__init__(x, y) |
| 88 | self.x = x |
| 89 | self.y = y |
| 90 | |
| 91 | def __repr__(self): |
| 92 | return f"Point2D({self.x}, {self.y})" |
| 93 | |
| 94 | before = BetterPoint2D(5, 3) |
| 95 | print("Before: ", before) |