PEP 3131: Supporting Non-ASCII Identifiers

Eric Brunel eric.brunel at pragmadev.com
Tue May 15 04:52:21 EDT 2007


On Tue, 15 May 2007 09:38:38 +0200, Duncan Booth  
<duncan.booth at invalid.invalid> wrote:
> Recently there has been quite a bit of publicity about the One Laptop Per
> Child project. The XO laptop is just beginning rollout to children and
> provides two main programming environments: Squeak and Python. It is an
> exciting thought that that soon there will be millions of children in
> countries such as Nigeria, Brazil, Uruguay or Nepal[*] who have the
> potential to learn to program, but tragic if the Python community is too
> arrogant to consider it acceptable to use anything but English and ASCII.

You could say the same about Python standard library and keywords then.  
Shouldn't these also have to be translated? One can even push things a  
little further: I don't know about the languages used in the countries you  
mention, but for example, a simple construction like 'if <condition> <do  
something>' will look weird to a Japanese (the Japanese language has a  
"post-fix" feel: the equivalent of the 'if' is put after the condition).  
So why enforce an English-like sentence structure?

> Yes, any sensible widespread project is going to mandate a particular
> language for variable names and comments, but I see no reason at all why
> they all have to use English.

Because that's what already happens? We definitely are in a globalized  
world, and the only candidate language having a chance to allow people to  
communicate with each other is English. Period. And believe me, I don't  
like that (I'm French, if that can give you an idea about how much I  
don't...). But that's a fact. Even people knowing the same language  
sometimes communicate in English just in case they have to widen the  
discussion to somebody else. To give you a perfect example, I had to  
discuss just yesterday an answer we had to do to a Belgian guy, who speaks  
French without any problem. His mail was written in English, and we  
answered in English.

Anyway:

> I don't believe that Python should be restricted to people *serious*  
> about programming.

You have a point here. When learning to program, or when programming for  
fun without any intention to do something serious, it may be better to  
have a language supporting "native" characters in identifiers. My problem  
is: if you allow these, how can you prevent them from going public someday?
-- 
python -c "print ''.join([chr(154 - ord(c)) for c in  
'U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965$l7+-'])"



More information about the Python-list mailing list