Cédric Krier added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25543>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to