diff --git a/Lib/decimal.py b/Lib/decimal.py index 7f1827a2be5..b0a8f7f7c89 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -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): diff --git a/Misc/NEWS b/Misc/NEWS index eb4681197c2..354d0f0d113 100644 --- 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.