summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 2611f79..17d67d5 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -841,7 +841,7 @@ class Decimal(object):
if context is None:
context = getcontext()
- tmp = map(str, self._int)
+ tmp = list(map(str, self._int))
numdigits = len(self._int)
leftdigits = self._exp + numdigits
if eng and not self: # self = 0eX wants 0[.0[0]]eY, not [[0]0]0eY
@@ -1193,7 +1193,9 @@ class Decimal(object):
op1 = _WorkRep(self)
op2 = _WorkRep(other)
- ans = Decimal((resultsign, map(int, str(op1.int * op2.int)), resultexp))
+ ans = Decimal((resultsign,
+ tuple(map(int, str(op1.int * op2.int))),
+ resultexp))
if shouldround:
ans = ans._fix(context)
@@ -3145,7 +3147,7 @@ def _string2exact(s):
exp -= len(fracpart)
mantissa = intpart + fracpart
- tmp = map(int, mantissa)
+ tmp = list(map(int, mantissa))
backup = tmp
while tmp and tmp[0] == 0:
del tmp[0]