diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-10-07 19:23:50 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-10-07 19:23:50 (GMT) |
commit | 56df887b6c1c498af7b5decb3e069c111e4fb520 (patch) | |
tree | ab57b720053014edeb2d8898464b58af540a61a4 /Lib/decimal.py | |
parent | 7d52079395263fa7a9e8b82da86d0c595ad71859 (diff) | |
download | cpython-56df887b6c1c498af7b5decb3e069c111e4fb520.zip cpython-56df887b6c1c498af7b5decb3e069c111e4fb520.tar.gz cpython-56df887b6c1c498af7b5decb3e069c111e4fb520.tar.bz2 |
Merged revisions 75275 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75275 | mark.dickinson | 2009-10-07 20:22:05 +0100 (Wed, 07 Oct 2009) | 6 lines
Issue #7048: logb should round its result when that result doesn't fit
into the available precision. (Tests for this change are included in
the most recent set of testcases from the Decimal Specification site;
those testcases will be updated shortly.)
........
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index 33f5391..5045722 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -3209,7 +3209,8 @@ class Decimal(object): # otherwise, simply return the adjusted exponent of self, as a # Decimal. Note that no attempt is made to fit the result # into the current context. - return Decimal(self.adjusted()) + ans = Decimal(self.adjusted()) + return ans._fix(context) def _islogical(self): """Return True if self is a logical operand. |