PEP: Defining Unicode Literal Encodings (revision 1.1)
rnd at onego.ru
Sat Jul 14 19:27:22 CEST 2001
On Sat, 14 Jul 2001, M.-A. Lemburg wrote:
>> # -*- coding=utf-8 -*-
>I already mentioned allowing directives in comments to work around
>the problem of directive placement before the first doc-string.
>The above would then look like this:
># directive unicodeencoding='utf-8'
>u""" UTF-8 doc-string """
>The downside of this is that parsing comments breaks the current
>tokenizing scheme in Python: the tokenizer removes comments before
>passing the tokens to the compiler ...wouldn't be hard to
>fix though ;-) (note that tokenize.py does not)
BTW, it is possible to write variable names in national alphabet
is locale is set. But I do not know if this is side-effect
which will be corrected or behaviour one can rely on ;-)
It could be also nice to be able replace keywords with localised ones.
Python remains nice even after translating into Russian.
This + mending broken IDLE (which doesn't allow to enter cyrillic) will
allow beginners to think and write. Currently "writing while thinking"
works only for those who think in English ;-)
And such a move opens Python to secondary schools. For example, Logo has
national variants without any losses. Why Python, also targeted for
education requires to use English?
And unicoding (utf-8-ing) Python source could be the solution.
What do you think?
Sincerely yours, Roman Suzi
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Saturday, July 14, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "A mainframe: The biggest PC peripheral available." _/
More information about the Python-list