PEP 3131: Supporting Non-ASCII Identifiers

Anders J. Munch 2007 at jmunch.dk
Sun May 13 19:25:04 EDT 2007


Alex Martelli wrote:
> 
> Homoglyphic characters _introduced by accident_ should not be discounted
> as a risk, as, it seems to me, was done early in this thread after the
> issue had been mentioned.  In the past, it has happened to me to
> erroneously introduce such homoglyphs in a document I was preparing with
> a word processor, by a slight error in the use of the system- provided
> way for inserting characters not present on the keyboard; I found out
> when later I went looking for the name I _thought_ I had input (but I
> was looking for it spelled with the "right" glyph, not the one I had
> actually used which looked just the same) and just could not find it.

There's any number of things to be done about that.
1. # -*- encoding: ascii -*-
(I'd like to see you sneak those homoglyphic characters past *that*.)
2. pychecker and pylint - I'm sure you realise what they could do for you.
3. Use a font that doesn't have those characters or deliberately makes them 
distinct (that could help web browsing safety too).

I'm not discounting the problem, I just dont believe it's a big one.  Can we 
chose a codepoint subset that doesn't have these dupes?

- Anders



More information about the Python-list mailing list