diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2011-05-22 11:53:18 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2011-05-22 11:53:18 (GMT) |
commit | b455e58b95a6603f8464f6de4474c160a8f83047 (patch) | |
tree | c71a40a0a4815f88ef2001782dadc67f5c0505ac /Lib/decimal.py | |
parent | 203bdb3028574fb45caae44bbb9275d9a6aa2795 (diff) | |
download | cpython-b455e58b95a6603f8464f6de4474c160a8f83047.zip cpython-b455e58b95a6603f8464f6de4474c160a8f83047.tar.gz cpython-b455e58b95a6603f8464f6de4474c160a8f83047.tar.bz2 |
Issue #12079: Decimal(0).fma(Decimal('inf'), 'not a number') should give a TypeError, not a Decimal.InvalidOperation
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index f5277c5..1b11b10 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -1871,6 +1871,7 @@ class Decimal(object): """ other = _convert_other(other, raiseit=True) + third = _convert_other(third, raiseit=True) # compute product; raise InvalidOperation if either operand is # a signaling NaN or if the product is zero times infinity. @@ -1900,7 +1901,6 @@ class Decimal(object): str(int(self._int) * int(other._int)), self._exp + other._exp) - third = _convert_other(third, raiseit=True) return product.__add__(third, context) def _power_modulo(self, other, modulo, context=None): |