mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
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:
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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user