Allowing non-ASCII identifiers

Paul Prescod paul at prescod.net
Fri Feb 13 15:03:28 EST 2004


Brian Quinlan wrote:

>>Have you ever seen real code like that? 
> 
> I've never seen any non-ASCII code in any language. 

So other programming languages make non-ASCII characters possible but 
English-speakers do not end up paying any price. So what's the problem?

Panic in the Python world strikes me as just FUD.

>>If not, what are you worried about? That C# programmers are reasonable 
>>but Python programmers are devious and will go to extra effort to make
>>your life difficult?
> 
> 
> I don't think that there is any reasonable usage of syntax like that, so why
> have it in the language?

We are getting a little off track. Nobody really proposed to borrow C#'s 
identifier syntax whole hog (i.e have a keyword-escaping mechanism). I 
proposed to learn from C# and Java. They allow non-ASCII keywords and 
nobody seems to be hurt by it.

As far as "reasonable usage" of non-English identifiers. Non-English 
speakers tell me that this is reasonable and I trust them to understand 
their situation better than I do!

But as an aside, the idea of allowing keywords to also be identifiers 
(with appropriate escaping syntax) is not a bad ones.

Let's say you are calling an XML-RPC server that uses a method name that 
happens to also be a Python keyword (e.g. "yield"). Of course your 
XML-RPC API could have a specific way of working around this but knowing 
the way the Python world works, it will use a different convention than 
your COM API which will use a different convention than your SOAP API 
which will use a different convention than your PyObjectiveC API, etc. 
Why not have the language standardize?

  Paul Prescod






More information about the Python-list mailing list