]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 68321 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Sun, 4 Jan 2009 21:37:56 +0000 (21:37 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 4 Jan 2009 21:37:56 +0000 (21:37 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r68321 | mark.dickinson | 2009-01-04 21:34:18 +0000 (Sun, 04 Jan 2009) | 13 lines

  Merged revisions 68317-68318 via svnmerge from
  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 1f6218cd4ac9208fcc986f4c6a8e63541e8afe9b..02216702c661f17d81ae0d827d0f26151f2a2759 100644 (file)
@@ -1514,13 +1514,13 @@ class Decimal(_numbers.Real):
 
     __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
@@ -3221,7 +3221,7 @@ class Decimal(_numbers.Real):
         (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):
@@ -3235,7 +3235,7 @@ class Decimal(_numbers.Real):
         (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 a9bb902fdcd8b4667a98249d9e83654a5b2f37bf..15e69c568d327a7400be15303542d48c02ba7923 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -64,6 +64,8 @@ Core and Builtins
 Library
 -------
 
+- Restore Python 2.3 compatibility for decimal.py.
+
 - Issue #3638: Remove functions from _tkinter module level that depend on
   TkappObject to work with multiple threads.