This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ced
Recipients ced, vstinner
Date 2015-11-03.13:51:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446558694.72.0.86897382495.issue25543@psf.upfronthosting.co.za>
In-reply-to
Content
But you can have some strange behaviour:

>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8')
'fr_FR.UTF-8'
>>> locale.atof('2.500,5')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/locale.py", line 316, in atof
    return func(string)
ValueError: invalid literal for float(): 2.500.5
>>> locale.atof('2.500')
2.5

If you agree to make it more strict, I can work on a patch, otherwise I will just add some tests on my code.
History
Date User Action Args
2015-11-03 13:51:34cedsetrecipients: + ced, vstinner
2015-11-03 13:51:34cedsetmessageid: <1446558694.72.0.86897382495.issue25543@psf.upfronthosting.co.za>
2015-11-03 13:51:34cedlinkissue25543 messages
2015-11-03 13:51:34cedcreate