bpo-38521: Fix error in NormalDist.__eq__() (GH-16840) (GH-16842)
(cherry picked from commit 5eabec022b9a10734fcf58faad02c4d233592f64)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
diff --git a/Lib/statistics.py b/Lib/statistics.py
index 0d747b3..461ffae 100644
--- a/Lib/statistics.py
+++ b/Lib/statistics.py
@@ -1092,7 +1092,7 @@
"Two NormalDist objects are equal if their mu and sigma are both equal."
if not isinstance(x2, NormalDist):
return NotImplemented
- return (x1._mu, x2._sigma) == (x2._mu, x2._sigma)
+ return x1._mu == x2._mu and x1._sigma == x2._sigma
def __hash__(self):
"NormalDist objects hash equal if their mu and sigma are both equal."