[Python-3000-checkins] r56136 - python/branches/p3yk/Lib/decimal.py

guido.van.rossum python-3000-checkins at python.org
Sun Jul 1 06:22:01 CEST 2007


Author: guido.van.rossum
Date: Sun Jul  1 06:22:01 2007
New Revision: 56136

Modified:
   python/branches/p3yk/Lib/decimal.py
Log:
Make it so that test_decimal fails instead of hangs, to help automated
test runners.


Modified: python/branches/p3yk/Lib/decimal.py
==============================================================================
--- python/branches/p3yk/Lib/decimal.py	(original)
+++ python/branches/p3yk/Lib/decimal.py	Sun Jul  1 06:22:01 2007
@@ -841,7 +841,7 @@
         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
@@ -3145,7 +3145,7 @@
     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]


More information about the Python-3000-checkins mailing list