Multibyte Character Surport for Python
Martin v. Löwis
loewis at informatik.hu-berlin.de
Sat May 11 03:21:31 EDT 2002
"John Roth" <johnroth at ameritech.net> writes:
> The trouble is that while almost all of the languages used in the
> Americas, Australia and Western Europe are based on
> the Latin alphabet, that isn't true in the rest of the world, and
> even then, it gets uncomfortable if your particular language's
> diacritical marks aren't supported. You can't do really good,
> descriptive names.
I personally can live without the diacritical marks in program source
code, except when it comes to spelling my name - and I usually put
this into strings and comments only.
I'm fully aware that many people in this world write their languages
without latin letters. I still doubt that this is an obstacle when
writing software.
> 1. In Python 3.0, the input character set is unicode - either UTF-16
> or UTF-8 (I'm not prepared to make a solid arguement one way or the
> other at this time.)
Actually, PEP 263 gives a much wider choice; consider this aspect
solved.
> 2. All identifiers MUST be expressed in the character set of
> a single language (treating the various latin derived languages
> as one for simplicity.) That doesn't mean that only one language
> can be used for a module, only that a particular identifer must make
> lexical sense in a specific language.
That sounds terrible. Are you sure you can implement this? For
example, what about the Cyrillic-based languages? Are you also
treating them as one for simplicity? Can you produce a complete list
of languages, and for each one, a complete list of characters?
> 3. There must be a complete set of syntax words in each
> supported language. That is, words such as 'and', 'or', 'if', 'else'
> All such syntax words in a particular module must come from the
> same language.
That is even more terrible. So far, nobody has proposed to translate
Python keywords. How are you going to implement that: i.e. can you
produce a list of keywords for each language? How would I spell 'def'
in German?
Regards,
Martin
More information about the Python-list
mailing list