[Python-Dev] Python and the Unicode Character Database
"Martin v. Löwis"
martin at v.loewis.de
Sun Nov 28 23:56:47 CET 2010
Am 28.11.2010 23:31, schrieb Alexander Belopolsky:
> On Sun, Nov 28, 2010 at 5:17 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>>>>>>> float('١٢٣٤.٥٦')
>>>> 1234.56
>>
>> I think it's a bug that this works. The definition of the float builtin says
>>
>> Convert a string or a number to floating point. If the argument is a
>> string, it must contain a possibly signed decimal or floating point
>> number, possibly embedded in whitespace. The argument may also be
>> '[+|-]nan' or '[+|-]inf'.
>>
>
> This definition fails long before we get beyond 127-th code point:
>
>>>> float('infinity')
> inf
What do infer from that? That the definition is wrong, or the code is wrong?
Regards,
Martin
More information about the Python-Dev
mailing list