PEP 3131: Supporting Non-ASCII Identifiers

"Martin v. Löwis" martin at v.loewis.de
Thu May 17 09:01:27 EDT 2007


> In the code I was looking at identifiers were allowed to use non-ASCII
> characters.  For whatever reason, the programmers choose not use non-ASCII
> indentifiers even though they had no problem using non-ASCII characters
> in commonets.

One possible reason is that the tools processing the program would not
know correctly what encoding the source file is in, and would fail
when they guessed the encoding incorrectly. For comments, that is not
a problem, as an incorrect encoding guess has no impact on the meaning
of the program (if the compiler is able to read over the comment
in the first place).

Another possible reason is that the programmers were unsure whether
non-ASCII identifiers are allowed.

Regards,
Martin



More information about the Python-list mailing list