mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
bpo-31979: Simplify transforming decimals to ASCII (#4336)
in int(), float() and complex() parsers. This also speeds up parsing non-ASCII numbers by around 20%.
This commit is contained in:
parent
ce12629c84
commit
9b6c60cbce
7 changed files with 63 additions and 139 deletions
|
@ -51,7 +51,7 @@ class GeneralFloatCases(unittest.TestCase):
|
|||
self.assertRaises(TypeError, float, {})
|
||||
self.assertRaisesRegex(TypeError, "not 'dict'", float, {})
|
||||
# Lone surrogate
|
||||
self.assertRaises(UnicodeEncodeError, float, '\uD8F0')
|
||||
self.assertRaises(ValueError, float, '\uD8F0')
|
||||
# check that we don't accept alternate exponent markers
|
||||
self.assertRaises(ValueError, float, "-1.7d29")
|
||||
self.assertRaises(ValueError, float, "3D-14")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue