summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-01-04 21:34:18 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-01-04 21:34:18 (GMT)
commit315a20a6f3ae1365b7ab49ce8822a960f9a69733 (patch)
treea2d2657bd23ceda51720f120995f1b3772f07285 /Lib/decimal.py
parentba298e4942168f08762d9ddbef32d6b08890d3c5 (diff)
downloadcpython-315a20a6f3ae1365b7ab49ce8822a960f9a69733.zip
cpython-315a20a6f3ae1365b7ab49ce8822a960f9a69733.tar.gz
cpython-315a20a6f3ae1365b7ab49ce8822a960f9a69733.tar.bz2
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 ........
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index baff38b..b486d36 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -1555,13 +1555,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
@@ -3262,7 +3262,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):
@@ -3276,7 +3276,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):