[Python-3000] Displaying strings containing unicode escapes
"Martin v. Löwis"
martin at v.loewis.de
Thu May 1 18:33:05 CEST 2008
> The problem is that this doesn't display the representation of strings
> and identifier names in an unambiguous way. "AKMOT" could be
> all-ASCII, it could be all-Cyrillic, or it could be a mixture of
> ASCII, Cyrillic, and Greek.
I don't see this is a problem. Yes, it can happen, but no, it is not a
problem.
Unless I lost the thread, we are still talking about the repr() of
regular strings here, right?
> How about choosing a standard Python repertoire (based on the Unicode
> standard, of course) of which characters get a graphic repr and which
> ones get \u-escaped, and have a post-hook for repr which gets passed
> the string repr proposes to print out?
You mean, you only display the characters if they form a valid
identifier? That would not be good, since it would disallow display
of symbols.
Regards,
Martin
More information about the Python-3000
mailing list