Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Reapply r68191. | Raymond Hettinger | 2009-01-03 | 1 | -56/+56 |
| | |||||
* | Issue 4796: Add from_float methods to the decimal module. | Raymond Hettinger | 2009-01-03 | 1 | -56/+106 |
| | |||||
* | Issue #4812: further renaming of internal Decimal constants, for clarity. | Mark Dickinson | 2009-01-03 | 1 | -56/+56 |
| | |||||
* | Issue #4812: add missing underscore prefix to some internal-use-only | Mark Dickinson | 2009-01-02 | 1 | -63/+63 |
| | | | | constants in the decimal module. (Dec_0 becomes _Dec_0, etc.) | ||||
* | Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to | Facundo Batista | 2008-12-11 | 1 | -16/+16 |
| | | | | | | 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. | ||||
* | Fix: | Neal Norwitz | 2008-08-24 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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. | ||||
* | Issue 2235: __hash__ is once again inherited by default, but inheritance can ↵ | Nick Coghlan | 2008-07-15 | 1 | -4/+2 |
| | | | | be blocked explicitly so that collections.Hashable remains meaningful | ||||
* | Replace occurrences of '\d' with '[0-9]' in Decimal regex, to make sure | Mark Dickinson | 2008-07-02 | 1 | -10/+10 |
| | | | | | | | | 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. | ||||
* | Make sure that Context traps and flags dictionaries have values 0 and 1 | Mark Dickinson | 2008-05-04 | 1 | -2/+2 |
| | | | | (as documented) rather than True and False. | ||||
* | Some very minor changes to decimal.py in Python 2.6, aimed | Mark Dickinson | 2008-05-04 | 1 | -9/+9 |
| | | | | | | | | | | 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 | ||||
* | Backport Raymond's changes in r60508 to Python 2.6. | Mark Dickinson | 2008-05-03 | 1 | -4/+4 |
| | | | | 'Context flags get set, not incremented' | ||||
* | Fixed some test structures. Thanks Mark Dickinson. | Facundo Batista | 2008-05-02 | 1 | -5/+1 |
| | |||||
* | Issue #2482: Make sure that the coefficient of a Decimal | Mark Dickinson | 2008-03-25 | 1 | -3/+3 |
| | | | | | instance is always stored as a str instance, even when that Decimal has been created from a unicode string. | ||||
* | Issue #2478: Decimal(sqrt(0)) failed when the decimal context | Mark Dickinson | 2008-03-25 | 1 | -3/+3 |
| | | | | was not explicitly supplied. | ||||
* | Fix docstring typo. | Mark Dickinson | 2008-02-29 | 1 | -1/+1 |
| | |||||
* | Add __format__ method to Decimal, to support PEP 3101 | Mark Dickinson | 2008-02-29 | 1 | -0/+240 |
| | |||||
* | Remove duplicate 'import re' in decimal.py | Mark Dickinson | 2008-02-24 | 1 | -2/+1 |
| | |||||
* | Fix decimal repr which should have used single quotes like other reprs. | Raymond Hettinger | 2008-02-14 | 1 | -242/+242 |
| | |||||
* | Bring decimal a bit closer to the spec for Reals. | Raymond Hettinger | 2008-02-12 | 1 | -0/+14 |
| | |||||
* | Typos in decimal comment and documentation | Mark Dickinson | 2008-02-10 | 1 | -1/+1 |
| | |||||
* | Issue 1979: Make Decimal comparisons (other than !=, ==) involving NaN | Mark Dickinson | 2008-02-06 | 1 | -39/+110 |
| | | | | raise InvalidOperation (and return False if InvalidOperation is trapped). | ||||
* | Add support for trunc(). | Raymond Hettinger | 2008-01-24 | 1 | -0/+2 |
| | |||||
* | Docstring typos | Andrew M. Kuchling | 2008-01-16 | 1 | -3/+3 |
| | |||||
* | Issue 1780: Allow leading and trailing whitespace in Decimal constructor, | Mark Dickinson | 2008-01-12 | 1 | -3/+14 |
| | | | | | when constructing from a string. Disallow trailing newlines in Context.create_decimal. | ||||
* | Have Decimal.as_tuple return a named tuple. | Raymond Hettinger | 2008-01-11 | 1 | -1/+7 |
| | |||||
* | Issue #1757: The hash of a Decimal instance is no longer affected | Facundo Batista | 2008-01-08 | 1 | -3/+11 |
| | | | | by the current context. Thanks Mark Dickinson. | ||||
* | Some minor cleanups. Thanks Mark Dickinson. | Facundo Batista | 2007-12-19 | 1 | -34/+19 |
| | |||||
* | Removed the private _rounding_decision: it was not needed, and the code | Facundo Batista | 2007-12-17 | 1 | -94/+38 |
| | | | | is now simpler. Thanks Mark Dickinson. | ||||
* | fma speedup by avoiding to create a Context. Thanks Mark Dickinson. | Facundo Batista | 2007-12-04 | 1 | -16/+31 |
| | |||||
* | Faster _fix function, and some reordering for a more elegant | Facundo Batista | 2007-12-03 | 1 | -52/+47 |
| | | | | coding. Thanks Mark Dickinson. | ||||
* | Speedup and cleaning of __str__. Thanks Mark Dickinson. | Facundo Batista | 2007-12-03 | 1 | -71/+41 |
| | |||||
* | Reordering of __new__ to minimize isinstance() calls to most | Facundo Batista | 2007-11-30 | 1 | -55/+56 |
| | | | | used types. Thanks Mark Dickinson. | ||||
* | Major change in the internal structure of the Decimal | Facundo Batista | 2007-11-23 | 1 | -302/+219 |
| | | | | | | | | | | number: now it does not store the mantissa as a tuple of numbers, but as a string. This avoids a lot of conversions, and achieves a speedup of 40%. The API remains intact. Thanks Mark Dickinson. | ||||
* | The constructor from tuple was way too permissive: it allowed bad | Facundo Batista | 2007-10-19 | 1 | -10/+36 |
| | | | | | | | | coefficient numbers, floats in the sign, and other details that generated directly the wrong number in the best case, or triggered misfunctionality in the alorithms. Test cases added for these issues. Thanks Mark Dickinson. | ||||
* | Added a class to store the digits of log(10), so that they can be made | Facundo Batista | 2007-10-02 | 1 | -16/+49 |
| | | | | available when necessary without recomputing. Thanks Mark Dickinson | ||||
* | Made the various is_* operations return booleans. This was discussed | Facundo Batista | 2007-10-02 | 1 | -112/+95 |
| | | | | | | | | | | | with Cawlishaw by mail, and he basically confirmed that to these is_* operations, there's no need to return Decimal(0) and Decimal(1) if the language supports the False and True booleans. Also added a few tests for the these functions in extra.decTest, since they are mostly untested (apart from the doctests). Thanks Mark Dickinson | ||||
* | Issue #1772851. Optimization of __hash__ to behave better for big big | Facundo Batista | 2007-09-19 | 1 | -4/+11 |
| | | | | numbers. | ||||
* | Speed up of the various division operations (remainder, divide, | Facundo Batista | 2007-09-18 | 1 | -161/+139 |
| | | | | divideint and divmod). Thanks Mark Dickinson. | ||||
* | The methods always return Decimal classes, even if they're | Facundo Batista | 2007-09-17 | 1 | -34/+38 |
| | | | | | executed through a subclass (thanks Mark Dickinson). Added a bit of testing for this. | ||||
* | Put the parameter watchexp back in (changed watchexp from an int | Facundo Batista | 2007-09-13 | 1 | -2/+13 |
| | | | | | | | to a bool). Also second argument to watchexp is now converted to Decimal, just as with all the other two-argument operations. Thanks Mark Dickinson. | ||||
* | Merged the decimal-branch (revisions 54886 to 58140). Decimal is now | Facundo Batista | 2007-09-13 | 1 | -702/+2846 |
| | | | | | | | fully updated to the latests Decimal Specification (v1.66) and the latests test cases (v2.56). Thanks to Mark Dickinson for all his help during this process. | ||||
* | When passed a bad formed literal to Decimal, now we have a | Facundo Batista | 2007-08-15 | 1 | -1/+2 |
| | | | | better error message, more descriptive. (bug #1770009) | ||||
* | Whitespace normalization. Ugh, we really need to do this more often. | Neal Norwitz | 2007-04-25 | 1 | -4/+4 |
| | | | | You might want to review this change as it's my first time. Be gentle. :-) | ||||
* | General clean-up. Lot of margin corrections, comments, some typos. | Facundo Batista | 2007-04-10 | 1 | -159/+170 |
| | | | | | Exceptions now are raised in the new style. And a mockup class is now also new style. Thanks Santiago Pereson. | ||||
* | Fix docstring bug | Raymond Hettinger | 2007-02-08 | 1 | -1/+1 |
| | |||||
* | Add missing word in comment | Neal Norwitz | 2006-09-02 | 1 | -1/+1 |
| | |||||
* | Make decimal.ContextManager a private implementation detail of ↵ | Nick Coghlan | 2006-09-02 | 1 | -24/+5 |
| | | | | decimal.localcontext() | ||||
* | Fix the wrongheaded implementation of context management in the decimal ↵ | Nick Coghlan | 2006-08-31 | 1 | -15/+65 |
| | | | | module and add unit tests. (python-dev discussion is ongoing regarding what we do about Python 2.5) | ||||
* | Revert r50706 (Whitespace normalization) and | Martin v. Löwis | 2006-07-19 | 1 | -205/+184 |
| | | | | | r50697: Comments and docs cleanups, and some little fixes per recommendation from Raymond Hettinger. | ||||
* | Whitespace normalization. | Tim Peters | 2006-07-18 | 1 | -6/+6 |
| |