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
[Diverting to python-ideas, since this isn't as clear-cut as you think.]
Why exactly is that expected behavior? What's the use case? (Surely
you don't have a keyboard that generates \u2212 when you hit the minus
key? :-)
Is there a Unicode standard for parsing numbers? IIRC there are a
variety
On 08/06/2013 23:30, Guido van Rossum wrote:
[Diverting to python-ideas, since this isn't as clear-cut as you think.]
Why exactly is that expected behavior? What's the use case? (Surely
you don't have a keyboard that generates \u2212 when you hit the minus
key? :-)
Is there a Unicode standard
On Sun, 09 Jun 2013 01:39:59 +0100, MRAB pyt...@mrabarnett.plus.com wrote:
On 08/06/2013 23:30, Guido van Rossum wrote:
[Diverting to python-ideas, since this isn't as clear-cut as you think.]
Why exactly is that expected behavior? What's the use case? (Surely
you don't have a keyboard