bpo-39218: Improve accuracy of variance calculation (GH-27960)

This commit is contained in:
Raymond Hettinger 2021-08-30 20:57:30 -05:00 committed by GitHub
parent 044e8d866f
commit 793f55bde9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 14 deletions

View file

@ -1210,6 +1210,9 @@ class UnivariateTypeMixin:
def __add__(self, other):
return type(self)(super().__add__(other))
__radd__ = __add__
def __mul__(self, other):
return type(self)(super().__mul__(other))
__rmul__ = __mul__
return (float, Decimal, Fraction, MyFloat)
def test_types_conserved(self):