mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #12079: Decimal(0).fma(Decimal('inf'), 'not a number') should give a TypeError, not a Decimal.InvalidOperation
This commit is contained in:
parent
203bdb3028
commit
b455e58b95
3 changed files with 16 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue