[Python-checkins] r68317 - python/trunk/Lib/decimal.py

mark.dickinson python-checkins at python.org
Sun Jan 4 22:22:03 CET 2009


Author: mark.dickinson
Date: Sun Jan  4 22:22:02 2009
New Revision: 68317

Log:
More Python 2.3 compatibility fixes for decimal.py.


Modified:
   python/trunk/Lib/decimal.py

Modified: python/trunk/Lib/decimal.py
==============================================================================
--- python/trunk/Lib/decimal.py	(original)
+++ python/trunk/Lib/decimal.py	Sun Jan  4 22:22:02 2009
@@ -1556,13 +1556,13 @@
 
     __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
@@ -3174,7 +3174,7 @@
         (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):
@@ -3188,7 +3188,7 @@
         (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):


More information about the Python-checkins mailing list