PEP 3131: Supporting Non-ASCII Identifiers
Eric Brunel
eric.brunel at pragmadev.com
Tue May 15 05:51:20 EDT 2007
On Tue, 15 May 2007 11:25:50 +0200, Thorsten Kampe
<thorsten at thorstenkampe.de> wrote:
> * Eric Brunel (Tue, 15 May 2007 10:52:21 +0200)
>> On Tue, 15 May 2007 09:38:38 +0200, Duncan Booth
>> <duncan.booth at invalid.invalid> wrote:
>> > Recently there has been quite a bit of publicity about the One Laptop
>> Per
>> > Child project. The XO laptop is just beginning rollout to children and
>> > provides two main programming environments: Squeak and Python. It is
>> an
>> > exciting thought that that soon there will be millions of children in
>> > countries such as Nigeria, Brazil, Uruguay or Nepal[*] who have the
>> > potential to learn to program, but tragic if the Python community is
>> too
>> > arrogant to consider it acceptable to use anything but English and
>> ASCII.
>>
>> You could say the same about Python standard library and keywords then.
>
> You're mixing apples and peaches: identifiers (variable names) are
> part of the user interface for the programmer and free to his
> diposition.
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...
--
python -c "print ''.join([chr(154 - ord(c)) for c in
'U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965$l7+-'])"
More information about the Python-list
mailing list