From 5ca36697fe495f4cfd8a86ded14283bb20afc241 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Fri, 23 Apr 2021 17:17:37 -0700 Subject: [PATCH] Use ValueError, not Exception. --- math_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/math_utils.py b/math_utils.py index 2cacc2f..2e12699 100644 --- a/math_utils.py +++ b/math_utils.py @@ -43,7 +43,7 @@ def gcd_floats(a: float, b: float) -> float: def gcd_float_sequence(lst: List[float]) -> float: if len(lst) <= 0: - raise Exception("Need at least one number") + raise ValueError("Need at least one number") elif len(lst) == 1: return lst[0] assert len(lst) >= 2 -- 2.46.0