[Python-Dev] Unicode minus sign in numeric conversions

2013-06-08 Thread Łukasz Langa
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

Re: [Python-Dev] Unicode minus sign in numeric conversions

2013-06-08 Thread Guido van Rossum
[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

Re: [Python-Dev] Unicode minus sign in numeric conversions

2013-06-08 Thread MRAB
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

Re: [Python-Dev] Unicode minus sign in numeric conversions

2013-06-08 Thread R. David Murray
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