summaryrefslogtreecommitdiff
path: root/Lib/decimal.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 5b984731b2..6d0b34c000 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -2523,7 +2523,7 @@ class Decimal(object):
end -= 1
return _dec_from_triple(dup._sign, dup._int[:end], exp)
- def quantize(self, exp, rounding=None, context=None, watchexp=True):
+ def quantize(self, exp, rounding=None, context=None):
"""Quantize self so its exponent is the same as that of exp.
Similar to self._rescale(exp._exp) but with error checking.
@@ -2546,16 +2546,6 @@ class Decimal(object):
return context._raise_error(InvalidOperation,
'quantize with one INF')
- # if we're not watching exponents, do a simple rescale
- if not watchexp:
- ans = self._rescale(exp._exp, rounding)
- # raise Inexact and Rounded where appropriate
- if ans._exp > self._exp:
- context._raise_error(Rounded)
- if ans != self:
- context._raise_error(Inexact)
- return ans
-
# exp._exp should be between Etiny and Emax
if not (context.Etiny() <= exp._exp <= context.Emax):
return context._raise_error(InvalidOperation,