summaryrefslogtreecommitdiff
path: root/Lib/decimal.py
Commit message (Collapse)AuthorAgeFilesLines
* * Add __eq__ and __ne__ so that things like list.index() work properlyRaymond Hettinger2004-07-051-4/+10
| | | | | for lists of mixed types. * Test that sort works.
* * Update the todo list.Raymond Hettinger2004-07-051-1/+2
| | | | * Make ConversionSyntax signals get trapped by default.
* * Fixup docstringsRaymond Hettinger2004-07-051-7/+6
| | | | * Make capitals default part of DefaultContext
* Changed the rounding constant values to match their variable names.Raymond Hettinger2004-07-041-32/+23
| | | | | | | | | | | | | | | | | | 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.
* Fix clear_flags(). Make a readable (not evalable) Context repr.Raymond Hettinger2004-07-041-1/+9
|
* Namespace cleanups:Raymond Hettinger2004-07-031-123/+126
| | | | | | | * delete temporary globals immediately after use * move a global into a class variable * Rename BasicDefaultContext and ExtendedDefaultContext to BasicContext and ExtendedContext.
* * Make the tests independent of the default precision.Raymond Hettinger2004-07-031-119/+120
| | | | * Change the default precision to 28 (to match VB's decimal type).
* Work through several open todos:Raymond Hettinger2004-07-031-43/+32
| | | | | | | | | | | | | | | | | * 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.
* fix small consistency nitFred Drake2004-07-011-1/+1
|
* Move Decimal from the sandbox into production.Raymond Hettinger2004-07-011-0/+3085