| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
instance is always stored as a str instance, even
when that Decimal has been created from a unicode string.
|
|
|
|
| |
was not explicitly supplied.
|
|
|
|
| |
test failed.
|
| |
|
| |
|
|
|
|
| |
raise InvalidOperation (and return False if InvalidOperation is trapped).
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue
1965.
|
| |
|
|
|
|
|
| |
when constructing from a string. Disallow trailing newlines in
Context.create_decimal.
|
|
|
|
| |
by the current context. Thanks Mark Dickinson.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
numbers.
|
| |
|
|
|
|
|
| |
executed through a subclass (thanks Mark Dickinson).
Added a bit of testing for this.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
decimal.localcontext()
|
|
|
|
| |
module and add unit tests. (python-dev discussion is ongoing regarding what we do about Python 2.5)
|
| |
|
|
|
|
|
|
|
|
| |
effect at the time test_decimal was imported. Else
running test_decimal had the bad side effect of
permanently changing the decimal context in effect.
That caused text_tokenize to fail if it ran after
test_decimal.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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().
|
| |
|
|
|
|
| |
* The decimal module wouldn't load on builds without threads.
|
| |
|
|
|
|
|
|
|
|
| |
"all or none" to "all or some".
This provides much greater test coverage without eating much time.
It also makes it more likely that routine regression testing will
unearth bugs.
|
| |
|
|
|
|
|
|
|
| |
version 2.39 of dectest.zip adds some new test files and because
some existing test files were getting skipped).
* Remove two docstrings which cluttered unittest's output.
* Simplify a for-loop with a list comprehension.
|
| |
|
|
|
|
|
|
|
| |
by the locals() call in the context constructor.
* Remove unnecessary properties for int, exp, and sign which duplicated
information returned by as_tuple().
|
|
|
|
|
| |
* Context.create_decimal can take a zero default just like Decimal().
* Fix typo in comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
for lists of mixed types.
* Test that sort works.
|
| |
|
|
|
|
| |
* Change the default precision to 28 (to match VB's decimal type).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|