summaryrefslogtreecommitdiffstats
path: root/Lib/statistics.py
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-10-18 21:20:35 (GMT)
committerGitHub <noreply@github.com>2019-10-18 21:20:35 (GMT)
commit5eabec022b9a10734fcf58faad02c4d233592f64 (patch)
tree035bcaf1e28477e23804776247193ef1a4c94024 /Lib/statistics.py
parentecb035cd14c11521276343397151929a94018a22 (diff)
downloadcpython-5eabec022b9a10734fcf58faad02c4d233592f64.zip
cpython-5eabec022b9a10734fcf58faad02c4d233592f64.tar.gz
cpython-5eabec022b9a10734fcf58faad02c4d233592f64.tar.bz2
bpo-38521: Fix error in NormalDist.__eq__() (GH-16840)
Diffstat (limited to 'Lib/statistics.py')
-rw-r--r--Lib/statistics.py2
1 files changed, 1 insertions, 1 deletions
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 @@ class NormalDist:
"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."