unicode as valid naming symbols

Antoon Pardon antoon.pardon at rece.vub.ac.be
Wed Mar 26 04:25:43 EDT 2014


On 25-03-14 23:47, Ethan Furman wrote:
> On 03/25/2014 12:29 PM, Mark H Harris wrote:
>> On 3/25/14 2:24 PM, MRAB wrote:
>>> It's explained in PEP 3131.
>>>
>>> Basically, a name should to start with a letter (this has been extended
>>> to include Chinese characters, etc) or an underscore.
>>>
>>> λ is a classified as Lowercase_Letter.
>>>
>>> √ is classified as Math_Symbol.
>>
>>     Thanks much!  I'll note that for improvements. Any unicode symbol
>> (that is not a number) should be allowed as an
>> identifier.
>
> No, it shouldn't.  Doing so would mean we could not use √ as the
> square root operator in the future.

And what advantage would that bring over just using it as a function?

-- 
Antoon Pardon



More information about the Python-list mailing list