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:
Mark Dickinson 2009-10-26 21:11:20 +00:00
parent 3e1eb0f715
commit 8568b19850
2 changed files with 24 additions and 37 deletions

View file

@ -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):