[Python-ideas] PEP: Shorthand Symbol for "self"

Terry Reedy tjreedy at udel.edu
Mon Aug 25 17:46:06 CEST 2008

Brandon Mintern wrote:

> Having used Lisp before Python, I'm used to just about any character
> being allowed in identifier names. The more characters available, the
> more expressive the names can be, and I think it could only help
> things. 

3.0 uses the standard Unicode syntax for identifiers:
identifier  ::=  id_start id_continue*

id_start    ::=  <all characters in general categories Lu, Ll, Lt, Lm, 
Lo, Nl, the underscore, and characters with the Other_ID_Start property>

id_continue ::=  <all characters in id_start, plus characters in the 
categories Mn, Mc, Nd, Pc and others with the Other_ID_Continue property>
This is 10s of thousands of characters ;-)
-- but no symbols.
The Unicode category codes mentioned above stand for:

Lu - uppercase letters
Ll - lowercase letters
Lt - titlecase letters
Lm - modifier letters
Lo - other letters
Nl - letter numbers
Mn - nonspacing marks
Mc - spacing combining marks
Nd - decimal numbers
Pc - connector punctuations

All identifiers are converted into the normal form NFC while parsing; 
comparison of identifiers is based on NFC.

I think we should stick with this international cross-language standard.


More information about the Python-ideas mailing list