[Python-3000] PEP 3131: what are the risks?
"Martin v. Löwis"
martin at v.loewis.de
Mon Jun 11 23:42:36 CEST 2007
> Here are the top three that I see; note that none of these concerns
> say "Don't use non-ASCII ids". They do all say "Don't use ids from a
> script the user hasn't said to expect".
>
> (1) Malicious user is indeed one risk. A small probability, but a
> big enough loss that I want a warning when the door is unlocked.
>
> (2) Typos is another risk. Even in mono-lingual environments, it is
> possible to get a wrong letter. If you're expecting ì, it is fine.
> If you're not, then it shouldn't pass silently.
>
> (3) "Reados". When doing maintenance later, if I wasn't expecting ì,
> I may see it as a regular i, and code that way. Now I have two
> doppelganger/döppelganger variables (or inherited methods) serving the
> same purpose, but using different memory locations.
I can see 1 as a risk, and I agree it has a small probability (because
the risk for the submitter of being discovered is much higher).
I can't see issues 2 or 3 as a risk. It *never* happened to me that
I mistakenly typed ì, as this just isn't on my keyboard. If it was
on my keyboard, I would be using a natural language that actually
uses that character, and then my eye would be trained to easily
recognize the typo. Likewise for 3: I could *never* confuse these
two words, and would always recognize both of them as typos
for doppelgänger (which is where the umlauts really belong).
To elaborate on the ì issue: there is a mode for German keyboards
where the accent characters are "dead", i.e. you type an accented
character, then the regular character. I usually turn that mode off,
but even if it was on, I would not *mistakenly* type ` first,
then the i. If I type ` on a keyboard with dead keys, I get *always*
puzzled about no character appearing, and then if the next vowel
eats the character, I immediately recognize - I meant to type a
backquote, but got none. If the backquote is part of the syntax,
the vowel "eating" it actually makes the entire text a syntax
error.
Regards,
Martin
More information about the Python-3000
mailing list