[Python-Dev] Python and the Unicode Character Database

Ben Finney ben+python at benfinney.id.au
Wed Dec 1 01:13:23 CET 2010


"Martin v. Löwis" <martin at v.loewis.de> writes:

> Am 30.11.2010 21:24, schrieb Ben Finney:
> > 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.

Who's talking about *entering* it into the program at a keyboard
directly, though? Input to a program can come from all kinds of crazy
sources. Just because it wasn't typed by the person at the keyboard
using this program doesn't stop it being input to the program.

A concrete example, but certainly not the only possible case: non-ASCII
digit characters representing integers, stored as text in a file.

Note that I'm not saying this is common. Nor am I saying it's a
desirable situation. I'm saying it is a feasible use case, to be
dismissed only if there is strong evidence that it's not used by
existing Python code.

-- 
 \       “When a well-packaged web of lies has been sold to the masses |
  `\    over generations, the truth will seem utterly preposterous and |
_o__)                    its speaker a raving lunatic.” —Dresden James |
Ben Finney



More information about the Python-Dev mailing list