Multibyte Character Surport for Python
Martin v. Loewis
martin at v.loewis.de
Tue May 14 16:51:12 EDT 2002
bokr at oz.net (Bengt Richter) writes:
> ISTM a grammar defining the composition of a multi-encoded file would
> make things a lot clearer.
What editor supports this kind of format?
> I think it is good to remember that a Python program is (or at least
> I consider it as such) an abstract entity first and variously
> represented second.
While this is true, a Python source code file is something very
specific, not something abstract.
> Abstract token sequences and visible glyph sequences and binary
> coded representations all have roles, but it is easy to smear the
> distinctions when thinking about them. Localization should IMO not
> alter abstract semantics.
And indeed, it doesn't - the byte code format is not at all affected
by the PEP.
> The possibility of dynamically generating source text and eval- or
> exec-ing it is something to consider too.
For that, I recommend to use Unicode objects - those don't have any
encoding issues.
Regards,
Martin
More information about the Python-list
mailing list