[Python-Dev] String encoding
Peter Funk
pf@artcom-gmbh.de
Tue, 23 May 2000 14:02:17 +0200 (MEST)
Hi Fredrik!
you wrote:
> before proceeding down this (not very slippery but slightly
> unfortunate, imho) slope, I think we should decide whether
>
> assert eval(repr(s)) == s
>
> should be true for strings.
[...]
What's the problem with this one? I've played around with several
locale settings here and I observed no problems, while doing:
>>> import string
>>> s = string.join(map(chr, range(128,256)),"")
>>> assert eval('"'+s+'"') == s
What do you fear here, if 'repr' will output characters from the
upper half of the charset without quoting them as octal sequences?
I don't understand.
Regards, Peter