Allowing non-ASCII identifiers

"Martin v. Löwis" martin at
Thu Feb 12 07:51:59 CET 2004

Scott David Daniels wrote:
> Because some of us use archaic systems and/or fonts which are
> incapable of displaying such symbols.  Never mind whether we
> can read them.

Right. However, policy whether to use non-ASCII identifiers
because of such issues should be with the source code authors,
not with the language implementation. Being able to use non-ASCII
identifiers does not mean you *have* to; not being able means
you *cannot*.

> Also, we would have to solve the issue of multiple representations
> for the same identifier (normalized identifiers)?  

I would use NFC, because it has the best chances of being displayed
properly even on terminals that don't do combining characters.

For the language itself, the specific choice of normalization form
is irrelevant - any form would do (but I agree that normalization
should happen).

> Unicode says we should treat these four identically.  Further,
> they each have a distinct hash code, so a dictionary will not 
> necessarily even try to compare them to find them equal.

If identifiers are Unicode-normalized, this is not an issue -
all copies of the normal form will hash identical.


More information about the Python-list mailing list