mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
90b5bc3a7d
commit
72bc54faed
527
Lib/decimal.py
527
Lib/decimal.py
File diff suppressed because it is too large
Load Diff
|
@ -464,6 +464,7 @@ class DecimalExplicitConstructionTest(unittest.TestCase):
|
|||
self.assertRaises(ValueError, Decimal, (1, (4, 3, 4, None, 1), 2) )
|
||||
self.assertRaises(ValueError, Decimal, (1, (4, -3, 4, 9, 1), 2) )
|
||||
self.assertRaises(ValueError, Decimal, (1, (4, 10, 4, 9, 1), 2) )
|
||||
self.assertRaises(ValueError, Decimal, (1, (4, 3, 4, 'a', 1), 2) )
|
||||
|
||||
def test_explicit_from_Decimal(self):
|
||||
|
||||
|
|
Loading…
Reference in New Issue