]> granicus.if.org Git - python/commitdiff
Merged revisions 68317-68318 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Sun, 4 Jan 2009 21:30:17 +0000 (21:30 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 4 Jan 2009 21:30:17 +0000 (21:30 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68317 | mark.dickinson | 2009-01-04 21:22:02 +0000 (Sun, 04 Jan 2009) | 2 lines

  More Python 2.3 compatibility fixes for decimal.py.
........
  r68318 | mark.dickinson | 2009-01-04 21:25:40 +0000 (Sun, 04 Jan 2009) | 2 lines

  Misc/NEWS entry for r68317
........

Lib/decimal.py
Misc/NEWS

index 7f1827a2be56a53218267e0dfa91473b1b9e243b..b0a8f7f7c8944b38d6ed854888c550dec47e338c 100644 (file)
@@ -1515,13 +1515,13 @@ class Decimal(object):
 
     __trunc__ = __int__
 
-    @property
     def real(self):
         return self
+    real = property(real)
 
-    @property
     def imag(self):
         return Decimal(0)
+    imag = property(imag)
 
     def conjugate(self):
         return self
@@ -3133,7 +3133,7 @@ class Decimal(object):
         (opa, opb) = self._fill_logical(context, self._int, other._int)
 
         # make the operation, and clean starting zeroes
-        result = "".join(str(int(a)|int(b)) for a,b in zip(opa,opb))
+        result = "".join([str(int(a)|int(b)) for a,b in zip(opa,opb)])
         return _dec_from_triple(0, result.lstrip('0') or '0', 0)
 
     def logical_xor(self, other, context=None):
@@ -3147,7 +3147,7 @@ class Decimal(object):
         (opa, opb) = self._fill_logical(context, self._int, other._int)
 
         # make the operation, and clean starting zeroes
-        result = "".join(str(int(a)^int(b)) for a,b in zip(opa,opb))
+        result = "".join([str(int(a)^int(b)) for a,b in zip(opa,opb)])
         return _dec_from_triple(0, result.lstrip('0') or '0', 0)
 
     def max_mag(self, other, context=None):
index eb4681197c255f0a3425dc7348802a8f4a382e5b..354d0f0d113328c59a4d5742d3f310be6ec9520e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -158,6 +158,8 @@ Core and Builtins
 Library
 -------
 
+- Restore Python 2.3 compatibility for decimal.py.
+
 - Issue #1702551: distutils sdist was not excluding VCS directories under 
   Windows. Inital solution by Guy Dalberto.