PEP: Defining Python Source Code Encodings

Neil Hodgson nhodgson at bigpond.net.au
Fri Jul 27 07:30:43 EDT 2001


Marcin 'Qrczak' Kowalczyk
> I suspect that if foreign characters are allowed in
> identifiers, the recommended practice would be
> to make each feature available under an ASCII
> name too.

   Java and C# allow the use of Unicode escape sequences in variables so you
could have something like:

   double \u03C0 = 3.0;

   This would be a pain to work with but editors can be set up to show this
as the greek letter pi. Another common technique is to allow aliasing
statements such as VB's
    Declare Function CreateWindowEx Lib "USER32" _
    Alias "AnotherNameThatCouldIncludeWeirdCharacters"

   Neil






More information about the Python-list mailing list