summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-07-14 16:35:30 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-07-14 16:35:30 (GMT)
commitb91af521fddac47b14c57cd9ba736775334e6379 (patch)
tree8611dd08fc9ef766ab216dd12fc14b583ddef517 /Lib/decimal.py
parentfed52963fcf97154e0b7d1d82514767d95eb27e5 (diff)
downloadcpython-b91af521fddac47b14c57cd9ba736775334e6379.zip
cpython-b91af521fddac47b14c57cd9ba736775334e6379.tar.gz
cpython-b91af521fddac47b14c57cd9ba736775334e6379.tar.bz2
* Hide a loop induction variable that was inadvertantly being picked up
by the locals() call in the context constructor. * Remove unnecessary properties for int, exp, and sign which duplicated information returned by as_tuple().
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 88fa031..9cc9c0f 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -2054,17 +2054,6 @@ class Decimal(object):
except TypeError:
return 0
- #properties to immutability-near feature
- def _get_sign(self):
- return self._sign
- def _get_int(self):
- return self._int
- def _get_exp(self):
- return self._exp
- sign = property(_get_sign)
- int = property(_get_int)
- exp = property(_get_exp)
-
# support for pickling, copy, and deepcopy
def __reduce__(self):
return (self.__class__, (str(self),))
@@ -2120,8 +2109,10 @@ class Context(object):
_ignored_flags=[]):
if not isinstance(flags, dict):
flags = dict([(s,s in flags) for s in _signals])
+ del s
if traps is not None and not isinstance(traps, dict):
traps = dict([(s,s in traps) for s in _signals])
+ del s
for name, val in locals().items():
if val is None:
setattr(self, name, copy.copy(getattr(DefaultContext, name)))