mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod in
floatobject.c. Also, remove limitation on length of unicode inputs to float().
This commit is contained in:
parent
3e1eb0f715
commit
8568b19850
2 changed files with 24 additions and 37 deletions
|
@ -31,8 +31,6 @@ class GeneralFloatCases(unittest.TestCase):
|
|||
if test_support.have_unicode:
|
||||
self.assertEqual(float(unicode(" 3.14 ")), 3.14)
|
||||
self.assertEqual(float(unicode(" \u0663.\u0661\u0664 ",'raw-unicode-escape')), 3.14)
|
||||
# Implementation limitation in PyFloat_FromString()
|
||||
self.assertRaises(ValueError, float, unicode("1"*10000))
|
||||
|
||||
@test_support.run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE')
|
||||
def test_float_with_comma(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue