History log of /external/python/cpython2/Lib/decimal.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
af0b38f8145636d9caf8da847f8c635c7ccddc30 13-Aug-2016 Raymond Hettinger <python@rcn.com> Issue #27720: Fix error in eng_to_decimal docs and add examples from the specification.
/external/python/cpython2/Lib/decimal.py
8d496add74530767cad3aa8b5b371b9a7f0b8498 02-Jun-2016 Martin Panter <vadmium+py@gmail.com> Issue #27171: Fix typos in documentation, code comments, and tests
/external/python/cpython2/Lib/decimal.py
9a118f1dc3f23ead28f31fdc5144ad5ce01e5b7f 17-Apr-2016 Serhiy Storchaka <storchaka@gmail.com> Issue #26778: Fixed "a/an/and" typos in code comment and documentation.
/external/python/cpython2/Lib/decimal.py
fb136d19ff57d42cad9a7177ba8fdad3ef1577c6 08-Nov-2014 Raymond Hettinger <python@rcn.com> Remove unused import
/external/python/cpython2/Lib/decimal.py
20c049df37da20383bdc36e0de6e58f4ebc53659 14-Oct-2014 Serhiy Storchaka <storchaka@gmail.com> Issue #21855: Fixed the decimal module in unicode disabled build.
/external/python/cpython2/Lib/decimal.py
ce2ec49d92b4c31b6ad358402d8a124e7b03e239 26-Aug-2014 Stefan Krah <skrah@bytereef.org> Issue 22090: Fix '%' formatting for infinities and NaNs.
/external/python/cpython2/Lib/decimal.py
023c3e74a60493c71818a85f7e66fab5b1fdc3c5 08-Sep-2013 Senthil Kumaran <senthil@uthcode.com> Fix the dead link of IEEE_854-1987 standard with the Wikipedia entry.
Addresses issue #18438
/external/python/cpython2/Lib/decimal.py
088cec3ab70f83564d14a43f802e01d63a5fc905 24-Aug-2012 Mark Dickinson <mdickinson@enthought.com> Issue #15544: Fix Decimal.__float__ to work with payload-carrying NaNs.
/external/python/cpython2/Lib/decimal.py
8a9369bfa4fa01add9b19dced20467cf6803a8d7 25-Aug-2011 Raymond Hettinger <python@rcn.com> Update link to the decimal arithmetic specification.
/external/python/cpython2/Lib/decimal.py
a493ca3fae4dc6e07c3dc57eb7621c90ba8c7189 04-Jun-2011 Mark Dickinson <mdickinson@enthought.com> Issue #12080: Fix a performance issue in Decimal._power_exact that caused some corner-case Decimal.__pow__ calls to take an unreasonably long time.
/external/python/cpython2/Lib/decimal.py
d92232976e1cdc77a28d28b94b897c37e847492b 12-Apr-2011 Raymond Hettinger <python@rcn.com> Neaten-up the fix to issue 11830
/external/python/cpython2/Lib/decimal.py
e4579c33802f555594678ead8d4a163f033e8a54 12-Apr-2011 Raymond Hettinger <python@rcn.com> Issue #11830: Remove unnecessary introspection code in the decimal module.
It was causing a failed import in the Turkish locale where the locale
sensitive str.upper() method caused a name mismatch.
/external/python/cpython2/Lib/decimal.py
24b07bcba350bb86c4d6ca446e1564647a199868 15-Mar-2011 Ezio Melotti <ezio.melotti@gmail.com> #11515: fix several typos. Patch by Piotr Kasprzyk.
/external/python/cpython2/Lib/decimal.py
2c8c62e64d3c8438f13774d275755ad77a516ad6 12-Mar-2011 Mark Dickinson <mdickinson@enthought.com> Issue 11131: Fix sign of zero result on plus and minus operations in ROUND_FLOOR rounding mode.
/external/python/cpython2/Lib/decimal.py
9b9e12530d976d2698c583eb3784e11b10270eb8 08-Jul-2010 Mark Dickinson <dickinsm@gmail.com> Merged revisions 82654 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
r82654 | mark.dickinson | 2010-07-08 22:15:36 +0100 (Thu, 08 Jul 2010) | 3 lines

Issue #9136: Profiling Decimal gave 'dictionary changed size during iteration'.
Remove the use of locals() that caused this error.
........
/external/python/cpython2/Lib/decimal.py
e85aa739ab0d396665908c0a489cfdeb49c88674 08-Jul-2010 Mark Dickinson <dickinsm@gmail.com> Merged revisions 82646,82649-82650 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
r82646 | mark.dickinson | 2010-07-08 18:23:40 +0100 (Thu, 08 Jul 2010) | 1 line

In test_decimal, convert heuristic for skipping tests into an explicit skiplist.
........
r82649 | mark.dickinson | 2010-07-08 20:03:34 +0100 (Thu, 08 Jul 2010) | 1 line

Fix a performance issue in Decimal.pow. Thanks Stefan Krah for finding this.
........
r82650 | mark.dickinson | 2010-07-08 20:09:16 +0100 (Thu, 08 Jul 2010) | 1 line

Fix misplaced exactness check that was causing unnecessary work in Decimal.__pow__.
........
/external/python/cpython2/Lib/decimal.py
8a6f3fe3b5588da1e2803a308628ed909ea8bcfb 19-May-2010 Stefan Krah <stefan@bytereef.org> Fix typos in docstrings.
/external/python/cpython2/Lib/decimal.py
4f96f5ffc6dd0b171bb14666d134af84ae307752 04-May-2010 Mark Dickinson <dickinsm@gmail.com> Issue #8567: Fix incorrect precedence of signals in Decimal module.

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.
/external/python/cpython2/Lib/decimal.py
ed171abd93c7a507cb26339aa2d68a7e980378f6 02-Apr-2010 Raymond Hettinger <python@rcn.com> Issue 8257: Decimal constructor to accept float.
/external/python/cpython2/Lib/decimal.py
f3eeca16cbadd7da5836ed781572343863b1a074 02-Apr-2010 Mark Dickinson <dickinsm@gmail.com> Issue #7279: Make Decimal('nan') hashable. Decimal('snan') remains unhashable.

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.
/external/python/cpython2/Lib/decimal.py
e096e82e827f6092706c7349fd4944c275382eb5 02-Apr-2010 Mark Dickinson <dickinsm@gmail.com> Issue #7279: Make comparisons involving a Decimal sNaN signal InvalidOperation.
/external/python/cpython2/Lib/decimal.py
99d8096c174ccb025e8ff55e614ea3820f89e204 02-Apr-2010 Mark Dickinson <dickinsm@gmail.com> Issue #2531: Make float-to-decimal comparisons return correct results.

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.
/external/python/cpython2/Lib/decimal.py
456e1652cf63dfbd3b1d0af81af9582d204ddd02 18-Feb-2010 Mark Dickinson <dickinsm@gmail.com> Doctest fixes for decimal.py: add an integer-argument doctest for logical_invert; don't use integer literals with a leading zero.
/external/python/cpython2/Lib/decimal.py
6d8effb1fc6660921e5f61fdc2c898e86356c64b 18-Feb-2010 Mark Dickinson <dickinsm@gmail.com> Issue #7633: Context method in the decimal module (with the exception
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.
/external/python/cpython2/Lib/decimal.py
28e369a8f8a5fe416159a2a5604321574ea148b3 25-Jan-2010 Benjamin Peterson <benjamin@python.org> compare types with is not ==
/external/python/cpython2/Lib/decimal.py
a617e208fc9fcb8022f429bca20818c472ad9a4e 25-Jan-2010 Benjamin Peterson <benjamin@python.org> mention from_float() in error message
/external/python/cpython2/Lib/decimal.py
202eb9094cc9c504adb1ec122a233a3a19b35b7c 06-Jan-2010 Mark Dickinson <dickinsm@gmail.com> Add missing docstring for Context.divmod. Thanks Juan José Conti.
/external/python/cpython2/Lib/decimal.py
6f3900163a50d04ecae173e2703f626f5daf8318 29-Oct-2009 Mark Dickinson <dickinsm@gmail.com> Issue #7233: Fix Decimal.shift and Decimal.rotate methods for
arguments with more digits than the current context precision.
Bug reported by Stefan Krah.
/external/python/cpython2/Lib/decimal.py
0c67312c5c0d5d44e065d2ecc5023d0e47f815ee 29-Oct-2009 Mark Dickinson <dickinsm@gmail.com> Issue #7233: A number of two-argument Decimal methods were failing to
accept ints and longs for the second argument.
/external/python/cpython2/Lib/decimal.py
a7a52ab7ee58be0afca3a7763fffc928dcf5459d 20-Oct-2009 Mark Dickinson <dickinsm@gmail.com> Issue #7099: Decimal.is_normal should return True for all nonzero
finite non-subnormal values, even those with exponent > Emax.
/external/python/cpython2/Lib/decimal.py
15ae41c2db8b0779a7f584c238a8e9efe6e370b3 07-Oct-2009 Mark Dickinson <dickinsm@gmail.com> 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.)
/external/python/cpython2/Lib/decimal.py
5cfa8044ff9fd26dc4915fc2ce5b2d005eea3261 08-Sep-2009 Mark Dickinson <dickinsm@gmail.com> Issue #6857: Fix Decimal formatting to be consistent with existing float
formatting: both are now right-aligned by default.
/external/python/cpython2/Lib/decimal.py
968f1690d39e8c825f9af1b634ff5b5a9517c290 07-Sep-2009 Mark Dickinson <dickinsm@gmail.com> #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext.
/external/python/cpython2/Lib/decimal.py
491ea55f2866cc0b4fee036069fc07748920b0cf 07-Sep-2009 Mark Dickinson <dickinsm@gmail.com> Issue #6850: Fix bug in Decimal._parse_format_specifier for formats
with no type specifier.
/external/python/cpython2/Lib/decimal.py
7a7739d75ed505033445248a126830bedb17101b 28-Aug-2009 Mark Dickinson <dickinsm@gmail.com> Issue #6794: Fix handling of NaNs in Decimal.compare_total and
Decimal.compare_total_mag.
/external/python/cpython2/Lib/decimal.py
4326ad8f72053140aa658a0392a509c9da382670 02-Aug-2009 Mark Dickinson <dickinsm@gmail.com> Issue #6595: Allow Decimal constructor to accept non-European decimal
digits, as recommended by the specification. (Backport of r74279 from
py3k.)
/external/python/cpython2/Lib/decimal.py
a016debad07f11c3b85131b4205305d190ac9eca 27-Apr-2009 Raymond Hettinger <python@rcn.com> Update spec version number.
/external/python/cpython2/Lib/decimal.py
b14514a153857141631d602cadf094bc932f12ee 18-Mar-2009 Mark Dickinson <dickinsm@gmail.com> Fix bug in _insert_thousands_sep: too much zero padding could be
added for 'n' formats with non-repeating thousands-separator.
/external/python/cpython2/Lib/decimal.py
277859d5910782cc31bb27f2472893b8382ad391 18-Mar-2009 Mark Dickinson <dickinsm@gmail.com> Issue #2110: Add support for thousands separator and 'n' format specifier
to Decimal __format__ method.
/external/python/cpython2/Lib/decimal.py
b065e52bc284c2c28a967c4e82aa7ece6d09c562 17-Mar-2009 Mark Dickinson <dickinsm@gmail.com> Fix bug in Decimal __format__ method that swapped left and right
alignment.
/external/python/cpython2/Lib/decimal.py
daeceb2de80047f25aedbf16bf40dc5d619e64dd 10-Mar-2009 Raymond Hettinger <python@rcn.com> Add a version tag to the decimal module.
/external/python/cpython2/Lib/decimal.py
2c8585b0afb6a39c215a71963e2fadea96f2c6ae 03-Feb-2009 Raymond Hettinger <python@rcn.com> Register decimals as numbers.Number
/external/python/cpython2/Lib/decimal.py
e52c31450dfbe649b559b3fa96630d348b838c19 25-Jan-2009 Mark Dickinson <dickinsm@gmail.com> Remove uses of cmp from the decimal module.
/external/python/cpython2/Lib/decimal.py
65808ff0c08e60572cf81ebe5dc24794a706f390 04-Jan-2009 Mark Dickinson <dickinsm@gmail.com> More Python 2.3 compatibility fixes for decimal.py.
/external/python/cpython2/Lib/decimal.py
6a961637a826ab6293293866a43d5924cf1a77e7 04-Jan-2009 Mark Dickinson <dickinsm@gmail.com> Fix Decimal.from_float to use valid Python 2.3 syntax, as per
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.
/external/python/cpython2/Lib/decimal.py
b7e835b820fc7d17a02dc4cdf3b745bb993952ad 03-Jan-2009 Raymond Hettinger <python@rcn.com> Reapply r68191.
/external/python/cpython2/Lib/decimal.py
f4d8597a59990c41bc9cc8d499d8bc919d7ebf2d 03-Jan-2009 Raymond Hettinger <python@rcn.com> Issue 4796: Add from_float methods to the decimal module.
/external/python/cpython2/Lib/decimal.py
4aa04db5735795289b7a6a23b4a485ad6c64f1ac 03-Jan-2009 Mark Dickinson <dickinsm@gmail.com> Issue #4812: further renaming of internal Decimal constants, for clarity.
/external/python/cpython2/Lib/decimal.py
c5de0969ca2a82c66efd30bb675f03c2324a3b27 03-Jan-2009 Mark Dickinson <dickinsm@gmail.com> Issue #4812: add missing underscore prefix to some internal-use-only
constants in the decimal module. (Dec_0 becomes _Dec_0, etc.)
/external/python/cpython2/Lib/decimal.py
e29d435e0cefb3e1772f6de0844e628aac3cf98e 11-Dec-2008 Facundo Batista <facundobatista@gmail.com> Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
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.
/external/python/cpython2/Lib/decimal.py
18aa388ca084e1d40aa48c8c8f1b4f730c6fe059 24-Aug-2008 Neal Norwitz <nnorwitz@gmail.com> Fix:
* 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.
/external/python/cpython2/Lib/decimal.py
53663a695ef2bb96ac0252cd4cc4aa40d4f953be 15-Jul-2008 Nick Coghlan <ncoghlan@gmail.com> Issue 2235: __hash__ is once again inherited by default, but inheritance can be blocked explicitly so that collections.Hashable remains meaningful
/external/python/cpython2/Lib/decimal.py
70c3289085d08d97edbfaa626efc2d2c2ac21859 02-Jul-2008 Mark Dickinson <dickinsm@gmail.com> Replace occurrences of '\d' with '[0-9]' in Decimal regex, to make sure
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.
/external/python/cpython2/Lib/decimal.py
71f3b85497f25bad3b00555173c51378f64edbb5 04-May-2008 Mark Dickinson <dickinsm@gmail.com> Make sure that Context traps and flags dictionaries have values 0 and 1
(as documented) rather than True and False.
/external/python/cpython2/Lib/decimal.py
8aca9d032e7813da9a23fd0771c008aff5a5e62f 04-May-2008 Mark Dickinson <dickinsm@gmail.com> Some very minor changes to decimal.py in Python 2.6, aimed
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
/external/python/cpython2/Lib/decimal.py
1840c1abcade9215faf91b701ab4525ba948d9dc 03-May-2008 Mark Dickinson <dickinsm@gmail.com> Backport Raymond's changes in r60508 to Python 2.6.
'Context flags get set, not incremented'
/external/python/cpython2/Lib/decimal.py
ee340e501d2a59d70a91748ebd948787bfac8044 02-May-2008 Facundo Batista <facundobatista@gmail.com> Fixed some test structures. Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
8e85ffa4b213be809109180142a107a1ac66f4d5 25-Mar-2008 Mark Dickinson <dickinsm@gmail.com> Issue #2482: Make sure that the coefficient of a Decimal
instance is always stored as a str instance, even
when that Decimal has been created from a unicode string.
/external/python/cpython2/Lib/decimal.py
3b24ccbe7e2b43c4373e4b1e988df55978b819e7 25-Mar-2008 Mark Dickinson <dickinsm@gmail.com> Issue #2478: Decimal(sqrt(0)) failed when the decimal context
was not explicitly supplied.
/external/python/cpython2/Lib/decimal.py
f4da77765f8581e31620e9f49c68028e57b0ae85 29-Feb-2008 Mark Dickinson <dickinsm@gmail.com> Fix docstring typo.
/external/python/cpython2/Lib/decimal.py
1ddf1d8482f4fd8ae034bfd0221696ee2068c144 29-Feb-2008 Mark Dickinson <dickinsm@gmail.com> Add __format__ method to Decimal, to support PEP 3101
/external/python/cpython2/Lib/decimal.py
6a123cb7827859748a0096570dfbb5ceba0e59dc 24-Feb-2008 Mark Dickinson <dickinsm@gmail.com> Remove duplicate 'import re' in decimal.py
/external/python/cpython2/Lib/decimal.py
abe32371878dcaea31c835e10144fdaa2eca6492 14-Feb-2008 Raymond Hettinger <python@rcn.com> Fix decimal repr which should have used single quotes like other reprs.
/external/python/cpython2/Lib/decimal.py
116f72fa5ceb864efcc47da2f8c437fd29c7e8b3 12-Feb-2008 Raymond Hettinger <python@rcn.com> Bring decimal a bit closer to the spec for Reals.
/external/python/cpython2/Lib/decimal.py
3a94ee05f77d0200cfb7988d02f3fdf292932a94 10-Feb-2008 Mark Dickinson <dickinsm@gmail.com> Typos in decimal comment and documentation
/external/python/cpython2/Lib/decimal.py
2fc9263df56d28a6c1def6c8a0517bbddfa899af 06-Feb-2008 Mark Dickinson <dickinsm@gmail.com> Issue 1979: Make Decimal comparisons (other than !=, ==) involving NaN
raise InvalidOperation (and return False if InvalidOperation is trapped).
/external/python/cpython2/Lib/decimal.py
5a05364049a7b0c3eeee94fb7b77e6b41036b3ae 24-Jan-2008 Raymond Hettinger <python@rcn.com> Add support for trunc().
/external/python/cpython2/Lib/decimal.py
c8acc882a92c1fe5df95ae73b7b8004737ed9222 16-Jan-2008 Andrew M. Kuchling <amk@amk.ca> Docstring typos
/external/python/cpython2/Lib/decimal.py
59bc20bb273055e2cd48a467524d21340c1771cc 12-Jan-2008 Mark Dickinson <dickinsm@gmail.com> Issue 1780: Allow leading and trailing whitespace in Decimal constructor,
when constructing from a string. Disallow trailing newlines in
Context.create_decimal.
/external/python/cpython2/Lib/decimal.py
097a1903035f9ee2efb1953306123f183124125d 11-Jan-2008 Raymond Hettinger <python@rcn.com> Have Decimal.as_tuple return a named tuple.
/external/python/cpython2/Lib/decimal.py
52b25795c02442fc40f8932d05e5d728266339a4 08-Jan-2008 Facundo Batista <facundobatista@gmail.com> Issue #1757: The hash of a Decimal instance is no longer affected
by the current context. Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
0f5e7bf3049408d6f4c1855807204c9f13ae98f9 19-Dec-2007 Facundo Batista <facundobatista@gmail.com> Some minor cleanups. Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
e64acfad3dd13809943eecf50f11c40c510dedbe 17-Dec-2007 Facundo Batista <facundobatista@gmail.com> Removed the private _rounding_decision: it was not needed, and the code
is now simpler. Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
58f6f2e0c9fad1ef9ee921980888dc52da8100ce 04-Dec-2007 Facundo Batista <facundobatista@gmail.com> fma speedup by avoiding to create a Context. Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
2ec7415db5ad63c4e4b27ee793214071454f6fe5 03-Dec-2007 Facundo Batista <facundobatista@gmail.com> Faster _fix function, and some reordering for a more elegant
coding. Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
62edb71556d26f924a0e2e949af9cd3c211dea23 03-Dec-2007 Facundo Batista <facundobatista@gmail.com> Speedup and cleaning of __str__. Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
0d157a0154140dc6dcd491d62df3a2b66367be15 30-Nov-2007 Facundo Batista <facundobatista@gmail.com> Reordering of __new__ to minimize isinstance() calls to most
used types. Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
72bc54faed8f12dc89ecc989fc7921002db3427f 23-Nov-2007 Facundo Batista <facundobatista@gmail.com> Major change in the internal structure of the Decimal
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.
/external/python/cpython2/Lib/decimal.py
9b5e23148badbb0d11fffd05cf9d432f35631a4a 19-Oct-2007 Facundo Batista <facundobatista@gmail.com> The constructor from tuple was way too permissive: it allowed bad
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.
/external/python/cpython2/Lib/decimal.py
be6c7ba72ad2bc3087a7df20871387b11756e140 02-Oct-2007 Facundo Batista <facundobatista@gmail.com> Added a class to store the digits of log(10), so that they can be made
available when necessary without recomputing. Thanks Mark Dickinson
/external/python/cpython2/Lib/decimal.py
1a191df14dc2f37933ef32f553fcaa7a5ac77cf7 02-Oct-2007 Facundo Batista <facundobatista@gmail.com> Made the various is_* operations return booleans. This was discussed
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
/external/python/cpython2/Lib/decimal.py
8c202440699cef19602acc24822366d0d7c32083 19-Sep-2007 Facundo Batista <facundobatista@gmail.com> Issue #1772851. Optimization of __hash__ to behave better for big big
numbers.
/external/python/cpython2/Lib/decimal.py
cce8df2f678b1e1ec11c86cf2fabf12c2077577d 18-Sep-2007 Facundo Batista <facundobatista@gmail.com> Speed up of the various division operations (remainder, divide,
divideint and divmod). Thanks Mark Dickinson.
/external/python/cpython2/Lib/decimal.py
6c398da0e79cbd68ec4625f00f37a8f2a0a26e5c 17-Sep-2007 Facundo Batista <facundobatista@gmail.com> The methods always return Decimal classes, even if they're
executed through a subclass (thanks Mark Dickinson).
Added a bit of testing for this.
/external/python/cpython2/Lib/decimal.py
bd2fe839db886de6ce9631acd8aa9796b413a565 13-Sep-2007 Facundo Batista <facundobatista@gmail.com> Put the parameter watchexp back in (changed watchexp from an int
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.
/external/python/cpython2/Lib/decimal.py
353750c405c9099d0be69c6af1d17037b38c4ddf 13-Sep-2007 Facundo Batista <facundobatista@gmail.com> Merged the decimal-branch (revisions 54886 to 58140). Decimal is now
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.
/external/python/cpython2/Lib/decimal.py
849693989ade7304d9a112b01315ed3779ecdb0c 15-Aug-2007 Facundo Batista <facundobatista@gmail.com> When passed a bad formed literal to Decimal, now we have a
better error message, more descriptive. (bug #1770009)
/external/python/cpython2/Lib/decimal.py
0d4c06e06e5ee1f3bb1fa8068114bd700d74864a 25-Apr-2007 Neal Norwitz <nnorwitz@gmail.com> Whitespace normalization. Ugh, we really need to do this more often.
You might want to review this change as it's my first time. Be gentle. :-)
/external/python/cpython2/Lib/decimal.py
59c5884b4c37b6288911ff2aed218cfbb41f06ab 10-Apr-2007 Facundo Batista <facundobatista@gmail.com> General clean-up. Lot of margin corrections, comments, some typos.
Exceptions now are raised in the new style. And a mockup class is
now also new style. Thanks Santiago Pereson.
/external/python/cpython2/Lib/decimal.py
495df4716fce4156c1eb110f9342297164eecbb6 08-Feb-2007 Raymond Hettinger <python@rcn.com> Fix docstring bug
/external/python/cpython2/Lib/decimal.py
681d86743c21773bb00508dbacb05ed9012388d8 02-Sep-2006 Neal Norwitz <nnorwitz@gmail.com> Add missing word in comment
/external/python/cpython2/Lib/decimal.py
ced1218dd1b69ac848f8c79d1afaada5669af33c 02-Sep-2006 Nick Coghlan <ncoghlan@gmail.com> Make decimal.ContextManager a private implementation detail of decimal.localcontext()
/external/python/cpython2/Lib/decimal.py
8b6999b4c5fab174090be263ba90f193bdede141 31-Aug-2006 Nick Coghlan <ncoghlan@gmail.com> Fix the wrongheaded implementation of context management in the decimal module and add unit tests. (python-dev discussion is ongoing regarding what we do about Python 2.5)
/external/python/cpython2/Lib/decimal.py
cfe3128cd58c4a59d236527184b40352ae35e44a 19-Jul-2006 Martin v. Löwis <martin@v.loewis.de> Revert r50706 (Whitespace normalization) and
r50697: Comments and docs cleanups, and some little fixes
per recommendation from Raymond Hettinger.
/external/python/cpython2/Lib/decimal.py
73a9eade1c864a5351c4a33cd20983f11dd79d94 18-Jul-2006 Tim Peters <tim.peters@gmail.com> Whitespace normalization.
/external/python/cpython2/Lib/decimal.py
ac4ae4baf71fd4f14d1965c89529d88da7637c1a 18-Jul-2006 Facundo Batista <facundobatista@gmail.com> Comments and docs cleanups, and some little fixes, provided by Santiágo Peresón
/external/python/cpython2/Lib/decimal.py
1fb9f528bd69efa135bacda917ec7bb166068d5d 11-May-2006 Georg Brandl <georg@python.org> Typo fix.
/external/python/cpython2/Lib/decimal.py
afd5e63e243b600e5344a34760d9e6565dafe1a9 03-May-2006 Nick Coghlan <ncoghlan@gmail.com> Finish bringing SVN into line with latest version of PEP 343 by getting rid of all remaining references to context objects that I could find. Without a __context__() method context objects no longer exist. Also get test_with working again, and adopt a suggestion from Neal for decimal.Context.get_manager()
/external/python/cpython2/Lib/decimal.py
da5b701aeef755f2317a41e36cc950cfdc0c95cb 02-May-2006 Guido van Rossum <guido@python.org> Get rid of __context__, per the latest changes to PEP 343 and python-dev
discussion.
There are two places of documentation that still mention __context__:
Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without
spending a whole lot of time thinking about it; and whatsnew, which Andrew
usually likes to change himself.
/external/python/cpython2/Lib/decimal.py
a7e820a408fa3df02f8d42a183e06774e05cd871 25-Apr-2006 Nick Coghlan <ncoghlan@gmail.com> Move the PEP 343 documentation and implementation closer to the
terminology in the alpha 1 documentation.

- "context manager" reverts to its alpha 1 definition
- the term "context specifier" goes away entirely
- contextlib.GeneratorContextManager is renamed GeneratorContext

There are still a number of changes relative to alpha 1:

- the expression in the with statement is explicitly called the
"context expression" in the language reference
- the terms 'with statement context', 'context object' or 'with
statement context' are used in several places instead of a bare
'context'. The aim of this is to avoid ambiguity in relation to the
runtime context set up when the block is executed, and the context
objects that already exist in various application domains (such as
decimal.Context)
- contextlib.contextmanager is renamed to contextfactory
This best reflects the nature of the function resulting from the
use of that decorator
- decimal.ContextManager is renamed to WithStatementContext
Simple dropping the 'Manager' part wasn't possible due to the
fact that decimal.Context already exists and means something
different. WithStatementContext is ugly but workable.

A technically unrelated change snuck into this commit:
contextlib.closing now avoids the overhead of creating a
generator, since it's trivial to implement that particular
context manager directly.
/external/python/cpython2/Lib/decimal.py
f669436189dd44a841caa9ab1ad97a3f7662bf58 10-Mar-2006 Guido van Rossum <guido@python.org> Um, I thought I'd already checked this in.
Anyway, this is the changes to the with-statement
so that __exit__ must return a true value in order
for a pending exception to be ignored.
The PEP (343) is already updated.
/external/python/cpython2/Lib/decimal.py
1a5e21e0334a6d4e1c756575023c7157fc9ee306 28-Feb-2006 Guido van Rossum <guido@python.org> Updates to the with-statement:

- New semantics for __exit__() -- it must re-raise the exception
if type is not None; the with-statement itself doesn't do this.
(See the updated PEP for motivation.)

- Added context managers to:
- file
- thread.LockType
- threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore}
- decimal.Context

- Added contextlib.py, which defines @contextmanager, nested(), closing().

- Unit tests all around; bot no docs yet.
/external/python/cpython2/Lib/decimal.py
f33d01d304c349a7f555779c7c99930f1203adb7 22-Aug-2005 Georg Brandl <georg@python.org> bug [ 1266296 ] Mistakes in decimal.Context.subtract documentation
/external/python/cpython2/Lib/decimal.py
e5a0a9609faea9afdc6f81f1f6dfa07b1437e3ae 20-Jun-2005 Raymond Hettinger <python@rcn.com> Apply the _is_special guard.
/external/python/cpython2/Lib/decimal.py
eb2608415ee4eb8aaea746f6a313937e264d0cda 07-Jun-2005 Raymond Hettinger <python@rcn.com> Minor namespace clean-up.
/external/python/cpython2/Lib/decimal.py
267b868f23a85c6a63a06452c85487355cf9ab8a 27-Mar-2005 Raymond Hettinger <python@rcn.com> * Fix decimal's handling of foreign types. Now returns NotImplemented
instead of raising a TypeError. Allows other types to successfully
implement __radd__() style methods.
* Remove future division import from test suite.
* Remove test suite's shadowing of __builtin__.dir().
/external/python/cpython2/Lib/decimal.py
bea3f6f5c788eb4f0f7639913ff89654152864c0 15-Mar-2005 Raymond Hettinger <python@rcn.com> Bug #1163325: "special" decimals aren't hashable
/external/python/cpython2/Lib/decimal.py
46b0802ccd9a9c47b27a285526fbb2a8bee5b8cb 01-Mar-2005 Brett Cannon <bcannon@gmail.com> Fix small grammatical error in a docstring.
/external/python/cpython2/Lib/decimal.py
dbecd93b7203cd187c1978de1207c29d3a9a686c 06-Feb-2005 Raymond Hettinger <python@rcn.com> Replace list of constants with tuples of constants.
/external/python/cpython2/Lib/decimal.py
7e71fa5cfa250968eafdb77356621e3a9bbb0648 18-Dec-2004 Raymond Hettinger <python@rcn.com> Bug #1083645

* The decimal module wouldn't load on builds without threads.
/external/python/cpython2/Lib/decimal.py
605ed0248375bbf87bbd1d80afc7c6918fd3ce2b 24-Nov-2004 Raymond Hettinger <python@rcn.com> SF bug #1071588 coercing decimal to int doesn't work between -1 and 1
/external/python/cpython2/Lib/decimal.py
17931de110ac84e6b0eb88d77a95798f8670765a 27-Oct-2004 Raymond Hettinger <python@rcn.com> SF patch #1053375.
(Contributed by Facundo Batista.)

Code simplification by eliminating the unnecessary and error-prone
convolutions for the previously weird sign convention in _WorkRep().
Makes the code more understandable, more reliable, and a bit faster.
/external/python/cpython2/Lib/decimal.py
99b5548298ffc2ae5f03bd9ef873ce45a9844f0e 27-Oct-2004 Facundo Batista <facundobatista@gmail.com> Very few little improvements.
/external/python/cpython2/Lib/decimal.py
76e60d687dde9d987f39e16f8fe7814daf1f1e26 20-Oct-2004 Raymond Hettinger <python@rcn.com> SF bug #1048728: Bug fixes and cleanup for decimal.py
(Contributed by Neal Norwitz. Reviewed by Facundo Bastista.)
/external/python/cpython2/Lib/decimal.py
abf8a56e68a38f5bcff1fa1aa3742ff35854dd45 12-Oct-2004 Raymond Hettinger <python@rcn.com> Don't use mutable values for method defaults.
/external/python/cpython2/Lib/decimal.py
dab988dd23e6328dadfe8408cd96abf4b017380d 09-Oct-2004 Raymond Hettinger <python@rcn.com> SF patch #1043218
Simplify internal calls and logic for _fix() and _fixexponents().
(Contributed by Facundo Batista.)
/external/python/cpython2/Lib/decimal.py
4837a223eea09681f0bf41d41882cad5ade0f6ab 27-Sep-2004 Raymond Hettinger <python@rcn.com> Use floor division operator.
/external/python/cpython2/Lib/decimal.py
636a6b100fe6083388bc5315758326078abe65b4 19-Sep-2004 Raymond Hettinger <python@rcn.com> SF patch #1020845: Decimal performance enhancements
(Contributed by Nick Coghlan.)

Various code cleanups and optimizations (saves about 40% on testsuite
execution time and on the telco benchmark).

* caches results of various operations on self (esp. checks for being
a special value).

* _WorkRep now uses ints and longs for intermediate computations.
/external/python/cpython2/Lib/decimal.py
27dbcf2162c61d5ba248c57c89ff4fa3d85a21c7 20-Aug-2004 Raymond Hettinger <python@rcn.com> Establish policies with respect to 2.3 compatibilty and treated spec
updates as bugfixes.
/external/python/cpython2/Lib/decimal.py
d6c700a320eacd6f04cbcc60996b84e765766890 17-Aug-2004 Raymond Hettinger <python@rcn.com> Revise max() and min() to comply with the 8/2/2004 update to the specification
(version 1.45):

The max and min operations follow the rules in the current IEEE 754 revision draft:
if one operand is a quiet NaN and the other is number, then the number is always returned
if both operands are finite and equal in numerical value then an ordering is applied:
if the signs differ then max returns the operand with the positive sign and
min returns the operand with the negative sign; if the signs are the same then
the exponent is used to select the result.
/external/python/cpython2/Lib/decimal.py
9fce44bc8cfb57d247e81ed18ac521db0fa015f5 08-Aug-2004 Raymond Hettinger <python@rcn.com> * Context.copy() now makes a deepcopy.
* Facilitate reloads of local thread.
/external/python/cpython2/Lib/decimal.py
61992efc4bb413ae7a19752215eca5af09be6b6d 07-Aug-2004 Raymond Hettinger <python@rcn.com> SF bug #1002530: test_decimal fails if repeated

* Protect the pre-defined contexts by using a deepcopy() instead of copy().
* Micro-optimization: prefer x&1 over x%2
/external/python/cpython2/Lib/decimal.py
ef66debd7ef590304466d13dde4082632750fa7c 14-Jul-2004 Raymond Hettinger <python@rcn.com> Use threading.local() instead of threading.currentThread().
/external/python/cpython2/Lib/decimal.py
99148e7eaad7741fbfb0822009b7c9b216ecc227 14-Jul-2004 Raymond Hettinger <python@rcn.com> Factor out two unnecessary global variables.
/external/python/cpython2/Lib/decimal.py
b91af521fddac47b14c57cd9ba736775334e6379 14-Jul-2004 Raymond Hettinger <python@rcn.com> * 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().
/external/python/cpython2/Lib/decimal.py
fed52963fcf97154e0b7d1d82514767d95eb27e5 14-Jul-2004 Raymond Hettinger <python@rcn.com> * Rename "Signals" to "_signals" making it non-public.
* Context.create_decimal can take a zero default just like Decimal().
* Fix typo in comment.
/external/python/cpython2/Lib/decimal.py
bf4406971ce34434ed914d17fab70370948d2aab 10-Jul-2004 Raymond Hettinger <python@rcn.com> Improve Context construction and representation:

* Rename "trap_enablers" to just "traps".
* Simplify names of "settraps" and "setflags" to just "traps" and "flags".
* Show "capitals" in the context representation
* Simplify the Context constructor to match its repr form so that only
the set flags and traps need to be listed.
* Representation can now be run through eval().

Improve the error message when the Decimal constructor is given a float.

The test suite no longer needs a duplicate reset_flags method.
/external/python/cpython2/Lib/decimal.py
d87ac8f24da5dce860b559b69e6af59edd2c3eec 09-Jul-2004 Raymond Hettinger <python@rcn.com> * Update the test suite to reflect that ConversionSyntax was no longer
public.
* Removed the non-signal conditions from __all__.
* Removed the XXX comment which was resolved.
* Use ^ instead of operator.xor
* Remove the threading lock which is no longer necessary.
/external/python/cpython2/Lib/decimal.py
5aa478badfabb005e6f17c98fcf007a0bc54eecc 09-Jul-2004 Raymond Hettinger <python@rcn.com> Module and tests:
* Map conditions to related signals.
* Make contexts unhashable.
* Eliminate used "default" attribute in exception definitions.
* Eliminate the _filterfunc in favor of a straight list.

Docs:
* Eliminate documented references to conditions that are not signals.
* Eliminate parenthetical notes such as "1/0 --> Inf" which are no
longer true with the new defaults.
/external/python/cpython2/Lib/decimal.py
bd7f76dd04780304c397323ae994092ce759d5a2 08-Jul-2004 Raymond Hettinger <python@rcn.com> Tim gets his default traps.
/external/python/cpython2/Lib/decimal.py
4e0e1b6a540e664e89739456db4c706701bf062b 07-Jul-2004 Tim Peters <tim.peters@gmail.com> Whitespace normalization.
/external/python/cpython2/Lib/decimal.py
0aeac107cadd1472e5ea109f7f29e6a6527ae1ec 06-Jul-2004 Raymond Hettinger <python@rcn.com> * Add __eq__ and __ne__ so that things like list.index() work properly
for lists of mixed types.
* Test that sort works.
/external/python/cpython2/Lib/decimal.py
ca3cc2fe2191367e1f939ab825804bfc72b34cd6 05-Jul-2004 Raymond Hettinger <python@rcn.com> * Update the todo list.
* Make ConversionSyntax signals get trapped by default.
/external/python/cpython2/Lib/decimal.py
e0f1581babe682552d7eadc4e54636b1c2775f0b 05-Jul-2004 Raymond Hettinger <python@rcn.com> * Fixup docstrings
* Make capitals default part of DefaultContext
/external/python/cpython2/Lib/decimal.py
0ea241e9e2d2accb625c4b1d3af6dd1f8df23a75 04-Jul-2004 Raymond Hettinger <python@rcn.com> Changed the rounding constant values to match their variable names.
This serves to made the context representation more useful (the names in
match the names out).

Removed the link to ReXX. That document did not shed add anything to
information already in the spec.

Further tighten the public API to improve usability:

* Emax and Emin are set through Context(). Their defaults are set in the
DefaultContext, so there is no need to expose DEFAULT_MAX_EXPONENT
and DEFAULT_MIN_EXPONENT.

* The string functions isnan() and isinfinity() were only used internal to
the module and were not among the test cases. External use cases are
served by the Decimal constructor. So, made these private.
/external/python/cpython2/Lib/decimal.py
b1b605ef546c45eac3c53db369ea6e881f05dc8b 04-Jul-2004 Raymond Hettinger <python@rcn.com> Fix clear_flags(). Make a readable (not evalable) Context repr.
/external/python/cpython2/Lib/decimal.py
9ec3e3b6eb4b36870bd28682e6c7a6c36911e5e0 03-Jul-2004 Raymond Hettinger <python@rcn.com> Namespace cleanups:
* delete temporary globals immediately after use
* move a global into a class variable
* Rename BasicDefaultContext and ExtendedDefaultContext
to BasicContext and ExtendedContext.
/external/python/cpython2/Lib/decimal.py
6ea484582238a65d44a76e3a831e3ba7c77a1a25 03-Jul-2004 Raymond Hettinger <python@rcn.com> * Make the tests independent of the default precision.
* Change the default precision to 28 (to match VB's decimal type).
/external/python/cpython2/Lib/decimal.py
d9c0a7ae94ef81e69d927d834131bad760d4d99d 03-Jul-2004 Raymond Hettinger <python@rcn.com> Work through several open todos:
* Added test for pickling contexts
* Renamed ExceptionList to Signals (to match wording in the spec)
* Simplified Context constructor by allowing flags=None to automatically
generate a zeroed-out flags dictionary.
* inlined _convertString() which was used only once
* _rounding_decision is private, so excluded its contants from __all__.
* added an XXX comment with concerns about subclassing signals results in
a deviation from the spec (maybe important, maybe not).
* Taught the test_suite to determine its own directory (modeled after code
in regrtest.py). Enables it to be run when the current directory is not
the test directory.
* Added a clear_flags() method to the Context API to make it easier to do
a common operation with flags.
* Fixed the trap_enablers defaults in BasicDefaultContext to match the spec.
/external/python/cpython2/Lib/decimal.py
1f34eb17b501687c1251678bcffab9accd432591 01-Jul-2004 Fred Drake <fdrake@acm.org> fix small consistency nit
/external/python/cpython2/Lib/decimal.py
7c85fa4a5203912aca564ce719a0fdd0fd5411e5 01-Jul-2004 Raymond Hettinger <python@rcn.com> Move Decimal from the sandbox into production.
/external/python/cpython2/Lib/decimal.py