(point, delta_x, delta_y)
| 233 | |
| 234 | print("Example 18") |
| 235 | def translate_replace(point, delta_x, delta_y): |
| 236 | return point._replace( # Changed |
| 237 | x=point.x + delta_x, |
| 238 | y=point.y + delta_y, |
| 239 | ) |
| 240 | |
| 241 | |
| 242 | point3 = ImmutablePoint("destination", 5, 3) |