From f98ee522d9137bc961caa8a5d062d3c69b0342cd Mon Sep 17 00:00:00 2001 From: "xuanyi.wang" Date: Mon, 3 Apr 2023 20:16:18 +0200 Subject: [PATCH] Update page 'Day 3 homework - Sloetjes' --- Day 3 homework - Sloetjes.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Day 3 homework - Sloetjes.md b/Day 3 homework - Sloetjes.md index f0a67ee..f47bb89 100644 --- a/Day 3 homework - Sloetjes.md +++ b/Day 3 homework - Sloetjes.md @@ -59,13 +59,7 @@ class BoundedInt: if self.max is not None and result > self.max: raise ValueError("Value exceeds maximum bound.") return BoundedInt(result, self.min, self.max) - - def __sub__(self, other): - result = self.i - other - if self.min is not None and result < self.min: - raise ValueError("Value exceeds minimum bound.") - return BoundedInt(result, self.min, self.max) - + def __radd__(self, other): return self.__add__(other)