[Python-3000] Support for PEP 3131

Jim Jewett jimjjewett at gmail.com
Tue Jun 12 01:13:14 CEST 2007


On 6/11/07, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> > One reason this matters -- even when the original author had good
> > intentions -- is that I edit my code as text, rather than graphics.  I
> > will often retype rather than cutting and pasting.  Since тор and нтер
> > are not the same as the visually similar Top and HTep, that will
> > eventually cause problems.

> It's actually unlikely that you encounter "тор" or "нтер" - they
> don't mean anything in Russian (FWIW, интерпретатор means interpreter;
> so "тор" is akin "ter" and "нтер" akin "nter").

> I cannot believe that you would actually consider retyping code
> that contains Cyrillic characters

Not if I realized they were Cyrillic -- and that is exactly my point.

By allowing any unicode letters, we would allow Cyrillic, and I might
open a file that uses Cyrillic without realizing it.

By allowing ASCII + locally approved charsets, I either won't have
Cyrillic indentifiers, or I will have turned them on explicitly, and
will know to look out for them.

> would you?), and even if you did - how would an ASCII-only flag
> on the interpreter help?

With ASCII-only, I would have gotten an error when I loaded the
original module in the first place, so I would know that I'm dealing
with Cyrillic (or at least with non-ASCII.)

> If you type Top and HTep (again, please
> look in my eyes and tell me that you would *actually* type in
> these identifiers), the error in the interpreter won't trigger.

To repeat:  Yes, if I thought those were the variable names, I would
type them -- and I've seen dumber variable names than those."

Of course, I wouldn't type them if I knew they were wrong.  With an
ASCII-only install, I would get that error-check because the
(remaining original uses) were in Cyrillic.  With an "any unicode
character" install, ... well, I might figure out my problem the next
morning.

-jJ


More information about the Python-3000 mailing list