- 19 May, 2010 1 commit
-
-
Stefan Krah authored
-
- 04 May, 2010 1 commit
-
-
Mark Dickinson authored
When a Decimal operation raises multiple signals and more than one of those signals is trapped, the specification determines the order in which the signals should be handled. In many cases this order wasn't being followed, leading to the wrong Python exception being raised. This commit fixes those cases, and adds extra tests. The tests are only enabled when EXTENDEDERRORTESTS is True, since they involve rerunning each Decimal testcase several times.
-
- 02 Apr, 2010 4 commits
-
-
Raymond Hettinger authored
-
Mark Dickinson authored
Also rewrite the Decimal __hash__ method so that it doesn't rely on float('inf') being valid: float('inf') could raise an exception on platforms not using IEEE 754 arithmetic.
-
Mark Dickinson authored
-
Mark Dickinson authored
Float to decimal comparison operations now return a result based on the numeric values of the operands. Decimal.__hash__ has also been fixed so that Decimal and float values that compare equal have equal hash value.
-
- 18 Feb, 2010 2 commits
-
-
Mark Dickinson authored
Doctest fixes for decimal.py: add an integer-argument doctest for logical_invert; don't use integer literals with a leading zero.
-
Mark Dickinson authored
of the 'canonical' and 'is_canonical' methods) now consistently accept integer arguments wherever a Decimal instance is accepted. Thanks Juan José Conti for the patch.
-
- 25 Jan, 2010 2 commits
-
-
Benjamin Peterson authored
-
Benjamin Peterson authored
-
- 06 Jan, 2010 1 commit
-
-
Mark Dickinson authored
-
- 29 Oct, 2009 2 commits
-
-
Mark Dickinson authored
arguments with more digits than the current context precision. Bug reported by Stefan Krah.
-
Mark Dickinson authored
accept ints and longs for the second argument.
-
- 20 Oct, 2009 1 commit
-
-
Mark Dickinson authored
finite non-subnormal values, even those with exponent > Emax.
-
- 07 Oct, 2009 1 commit
-
-
Mark Dickinson authored
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.)
-
- 08 Sep, 2009 1 commit
-
-
Mark Dickinson authored
formatting: both are now right-aligned by default.
-
- 07 Sep, 2009 2 commits
-
-
Mark Dickinson authored
#Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext.
-
Mark Dickinson authored
with no type specifier.
-
- 28 Aug, 2009 1 commit
-
-
Mark Dickinson authored
Decimal.compare_total_mag.
-
- 02 Aug, 2009 1 commit
-
-
Mark Dickinson authored
digits, as recommended by the specification. (Backport of r74279 from py3k.)
-
- 27 Apr, 2009 1 commit
-
-
Raymond Hettinger authored
-
- 18 Mar, 2009 1 commit
-
-
Mark Dickinson authored
added for 'n' formats with non-repeating thousands-separator.
-
- 17 Mar, 2009 2 commits
-
-
Mark Dickinson authored
to Decimal __format__ method.
-
Mark Dickinson authored
alignment.
-
- 10 Mar, 2009 1 commit
-
-
Raymond Hettinger authored
-
- 03 Feb, 2009 1 commit
-
-
Raymond Hettinger authored
-
- 25 Jan, 2009 1 commit
-
-
Mark Dickinson authored
-
- 04 Jan, 2009 2 commits
-
-
Mark Dickinson authored
-
Mark Dickinson authored
comments at top of decimal.py. (But note that the from_float method itself with still not be usable before Python 2.7.) See issue 4796 for discussion.
-
- 03 Jan, 2009 3 commits
-
-
Raymond Hettinger authored
-
Raymond Hettinger authored
-
Mark Dickinson authored
-
- 02 Jan, 2009 1 commit
-
-
Mark Dickinson authored
constants in the decimal module. (Dec_0 becomes _Dec_0, etc.)
-
- 11 Dec, 2008 1 commit
-
-
Facundo Batista authored
give correct results in the case where one argument is a quiet NaN and the other is a finite number that requires rounding. Thanks Mark Dickinson.
-
- 24 Aug, 2008 1 commit
-
-
Neal Norwitz authored
* crashes on memory allocation failure found with failmalloc * memory leaks found with valgrind * compiler warnings in opt mode which would lead to invalid memory reads * problem using wrong name in decimal module reported by pychecker Update the valgrind suppressions file with new leaks that are small/one-time leaks we don't care about (ie, they are too hard to fix). TBR=barry TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes) in opt mode: valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \ -x test_logging test_ssl test_multiprocessing valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py test_multiprocessing for i in `seq 1 4000` ; do LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \ ./python -c pass done At least some of these fixes should probably be backported to 2.5.
-
- 15 Jul, 2008 1 commit
-
-
Nick Coghlan authored
Issue 2235: __hash__ is once again inherited by default, but inheritance can be blocked explicitly so that collections.Hashable remains meaningful
-
- 02 Jul, 2008 1 commit
-
-
Mark Dickinson authored
that the behaviour of Decimal doesn't change if/when re.UNICODE becomes assumed in Python 3.0. Also add a check that alternative Unicode digits (e.g. u'\N{FULLWIDTH DIGIT ONE}') are *not* accepted in a numeric string.
-
- 04 May, 2008 2 commits
-
-
Mark Dickinson authored
(as documented) rather than True and False.
-
Mark Dickinson authored
at reducing the size of the diff between the 2.x decimal.py and 3.x decimal.py and thereby making future merges easier: - replace one instnace of an old-style raise statement - define __div__ in terms of __truediv__ instead of the other way around - make wording match on an exception message
-
- 03 May, 2008 1 commit
-
-
Mark Dickinson authored
'Context flags get set, not incremented'
-