[Python-Dev] Unicode minus sign in numeric conversions

Łukasz Langa lukasz at langa.pl
Sat Jun 8 23:49:22 CEST 2013


Expected behaviour:
>>> float('\N{MINUS SIGN}12.34')
-12.34


Current behaviour:
Traceback (most recent call last):
...
ValueError: could not convert string to float: '−12.34'


Please note: '\N{MINUS SIGN}' == '\u2212'

-- 
Best regards,
Łukasz Langa

WWW: http://lukasz.langa.pl/
Twitter: @llanga
IRC: ambv on #python-dev



More information about the Python-Dev mailing list