[Python-Dev] Python and the Unicode Character Database

"Martin v. Löwis" martin at v.loewis.de
Wed Dec 1 00:06:47 CET 2010


Am 30.11.2010 21:24, schrieb Ben Finney:
> haiyang kang <cornsea at gmail.com> writes:
> 
>>   I think it is a little ugly to have code like this: num =
>> float("一.一"), expected result is: num = 1.1
> 
> That's a straw man, though. The string need not be a literal in the
> program; it can be input to the program.
> 
>     num = float(input_from_the_external_world)
> 
> Does that change your assessment of whether non-ASCII digits are used?

I think the OP (haiyang kang) already indicated that he finds it quite
unlikely that anybody would possibly want to enter that. You would need
a number of key strokes to enter each individual ideograph, plus you
have to press the keys for keyboard layout switching to enter the Latin
decimal separator (which you normally wouldn't use along with the Han
numerals).

Regards,
Martin


More information about the Python-Dev mailing list