diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-01-04 21:22:02 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-01-04 21:22:02 (GMT) |
commit | 65808ff0c08e60572cf81ebe5dc24794a706f390 (patch) | |
tree | 9cb732fc3366f7bc47229eced053583f6070a884 /Lib | |
parent | 6a961637a826ab6293293866a43d5924cf1a77e7 (diff) | |
download | cpython-65808ff0c08e60572cf81ebe5dc24794a706f390.zip cpython-65808ff0c08e60572cf81ebe5dc24794a706f390.tar.gz cpython-65808ff0c08e60572cf81ebe5dc24794a706f390.tar.bz2 |
More Python 2.3 compatibility fixes for decimal.py.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/decimal.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index 12dd732..4140bea 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -1556,13 +1556,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 @@ -3174,7 +3174,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): @@ -3188,7 +3188,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): |