PEP 3131: Supporting Non-ASCII Identifiers

Hendrik van Rooyen mail at microcorp.co.za
Wed May 16 03:04:21 EDT 2007


"Eric Brunel" <e..l at pr...ev.com> wrote:

>So what? Does it mean that it's acceptable for the standard library and
>keywords to be in English only, but the very same restriction on
>user-defined identifiers is out of the question? Why? If I can use my own
>language in my identifiers, why can't I write:
>
>classe MaClasse:
>   définir __init__(moi_même, maListe):
>     moi_même.monDictionnaire = {}
>     pour i dans maListe:
>       moi_même.monDictionnaire[i] = Rien
>
>For a French-speaking person, this is far more readable than:
>
>class MaClasse:
>   def __init__(self, maListe):
>     self.monDictionnaire = {}
>     for i in maListe:
>       self.monDictionnaire[i] = None
>
>Now, *this* is mixing apples and peaches... And this would look even
>weirder with a non-indo-european language...
>

I don't have any French, but I support this point absolutely - having
native identifiers is NFG if you can't also have native reserved words.

You may be stuck with English sentence construction though. - Would
be hard, I would imagine, to let the programmer change the word order,
or to incorporate something as weird as the standard double negative
in Afrikaans...

We say things that translate literally to:  "I am not a big man not.", and it
is completely natural, so the if statements should follow the pattern.

- Hendrik




More information about the Python-list mailing list