[Python-3000] Support for PEP 3131

Jim Jewett jimjjewett at gmail.com
Fri May 25 17:04:24 CEST 2007


On 5/24/07, Guillaume Proux <gproux+py3000 at gmail.com> wrote:

> I have a hard time seeing how you could sniff out the willingness to
> accept in a Japanese environment, a piece of code written in Russian
> because your buddy from Siberia has written this cool matrix class
> that is 30% faster than most but contains a bunch of cyrillic
> characters because people are using cyrillic characters for local
> variable identifiers (but not module level identifiers).

You probably can't sniff that out automatically.  What you can do
automatically is say "Whoa!  unexpected characters!  If you're sure
that this code is OK, then do XYZ to allow it (and sufficiently
similar code) to run from now on."

If XYZ is simple enough, that seems a reasonable tradeoff.

The matrix class' distribution could even include the sample lines
that need to be added to your allowed-chars table, so you can do it
automatically at install time, *if* you explicitly indicate that you
know this source is using cyrillic, and that it is OK.

(In theory, you might want to allow cyrillic only for this file, not
for future files; in practice, people that careful can probably be
expected to do the extra work of setting up alternate environments.)

-jJ


More information about the Python-3000 mailing list