[Python-checkins] r75276 - in python/branches/py3k: Lib/decimal.py Misc/NEWS
python-checkins at python.org
Wed Oct 7 21:23:50 CEST 2009
Date: Wed Oct 7 21:23:50 2009
New Revision: 75276
Merged revisions 75275 via svnmerge from
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.)
python/branches/py3k/ (props changed)
--- python/branches/py3k/Lib/decimal.py (original)
+++ python/branches/py3k/Lib/decimal.py Wed Oct 7 21:23:50 2009
@@ -3209,7 +3209,8 @@
# 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)
"""Return True if self is a logical operand.
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Wed Oct 7 21:23:50 2009
@@ -87,6 +87,9 @@
+- Issue #7048: Force Decimal.logb to round its result when that result
+ is too large to fit in the current precision.
- Issue #6236, #6348: Fix various failures in the I/O library under AIX
and other platforms, when using a non-gcc compiler. Patch by egreen.
More information about the Python-checkins