PEP 3131: Supporting Non-ASCII Identifiers

René Fleschenberg rene at korteklippe.de
Wed May 16 03:12:40 EDT 2007


Steven D'Aprano schrieb:
> But they aren't new risks and problems, that's the point. So far, every 
> single objection raised ALREADY EXISTS in some form or another. 

No. The problem "The traceback shows function names having characters
that do not display on most systems' screens" for example does not exist
today, to the best of my knowledge. And "in some form or another"
basically means that the PEP would create more possibilities for things
to go wrong. That things can already go wrong today does not mean that
it does not matter if we create more occasions were things can go wrong
even worse.

> There's 
> all this hysteria about the problems the proposed change will cause, but 
> those problems already exist. When was the last time a Black Hat tried to 
> smuggle in bad code by changing an identifier from xyz0 to xyzO?

Agreed, I don't think intended malicious use of the proposed feature
would be a big problem.

>> I think it is not. I think that the problem only really applies to very
>> isolated use-cases. 
> 
> Like the 5.5 billion people who speak no English.

No. The X people who speak "no English" and program in Python. I think X
actually is very low (close to zero), because programming in Python
virtually does require you to know some English, wether you can use
non-ASCII characters in identifiers or not. It is naive to believe that
you can program in Python without understanding any English once you can
use your native characters in identifiers. That will not happen. Please
understand that: You basically *must* know some English to program in
Python, and the reason for that is not that you cannot use non-ASCII
identifiers.

I admit that there may be occasions where you have domain-specific terms
that are hard to translate into English for a programmer. But is it
really not feasible to use an ASCII transliteration in these cases? This
does not seem to have been such a big problem so far, or else we would
have seen more discussions about it, I think.

>> So isolated that they do not justify a change to
>> mainline Python. If someone thinks that non-ASCII identifiers are really
>> needed, he could maintain a special Python branch that supports them. I
>> doubt that there would be alot of demand for it.
> 
> Maybe so. But I guarantee with a shadow of a doubt that if the change 
> were introduced, people would use it -- even if right now they say they 
> don't want it.

Well, that is exactly what I would like to avoid ;-)

-- 
René



More information about the Python-list mailing list