diff --git a/recipes/Python/576816_Interval/recipe-576816.py b/recipes/Python/576816_Interval/recipe-576816.py index 11fe0ca22..ef98dad32 100644 --- a/recipes/Python/576816_Interval/recipe-576816.py +++ b/recipes/Python/576816_Interval/recipe-576816.py @@ -55,9 +55,7 @@ def intersection(self, other): def hull(self, other): "@return: Interval containing both self and other." - if self > other: - other, self = self, other - return Interval(self.start, other.end) + return Interval(min(self.start, other.start), max(self.end, other.end)) def overlap(self, other):