[I18n-sig] Strawman Proposal (2): Encoding attributes

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri, 9 Feb 2001 21:47:26 +0100


> > Sorry, Paul, but this will never happen. Python is an ASCII
> > programming language and does good at it.
>=20
> I am amazed to hear you say that. Why SHOULDN'T we allow Chinese
> variables names some day? This is the 21st century. If we don't go after
> Asian markets someone else will! I've gotta admit that that kind of
> Euro-centric attitude sort of annoys me...

I'm not sure it is Euro-centric; many European languages have
characters that can't be used in identifiers, either. People have
learned to accept this restriction.=20

Furthermore, there have been experiments with allowing arbitrary
characters in identifiers, so users could use their language for
identifiers. Turns out that this is nonsense, since it gives a mix of
English and local language; ie.

from string import atoi
def z=E4hle():
  global Z=E4hler
  try:
    Z=E4hler =3D Z=E4hler + 1
    print >>Datei, atoi(Z=E4hler)
  except IOError:
    raise Fehler()

does not read very well. People have then attempted to translate the
keywords as well, which would roughly give

Aus Zeichenkette importiere AzuG # ASCII zu Ganzzahl
def z=E4hle():
  globaler Z=E4hler # oder vielleicht besser: globales Z=E4hler?
  versuche:
    Z=E4hler =3D Z=E4hler + 1
    print >>Datei, atoi(Z=E4hler)
  au=DFer EinAusFehler:
    wirf Fehler()

which is clearly nonsense: for one thing, most people will have
difficulties to recognize the logic, even if they know both Python and
German. In addition, the constructs read well only in English - other
languages have different grammatical structures, for which you'd pick
different syntactical rules in your programming language. So Python's
syntax and standard library is already English-centric; allowing
additional identifiers won't fix that.

I'd really like to know whether speakers of non-Roman and non-Germanic
feel different about this issue: Should it be possible to pick Kanji
characters as identifiers?

Regards,
Martin

P.S. Something than can and should be done about Python itself is
translating the doc strings. Any volunteers that are interested in
doing so, please contact me - or just start translating the message
catalog that sits in the non-dist branch of the Python CVS.