[Python-3000] Displaying strings containing unicode escapes

"Martin v. Löwis" martin at v.loewis.de
Thu May 1 19:31:20 CEST 2008


>  > The escaping that repr() does is *not* to achieve unambiguity,
>  > but to achieve printability.
> 
> Well, if that is the case, then I withdraw my comments pretty much
> entirely, and apologize for the noise.  I think you've already
> specified what is needed to achieve printability correctly.

After I posted this, I read Guido's earlier message that the
case may not be as clear. So please take this as my own opinion,
not as a given - some people apparently want repr to provide
unambiguous output also.

If so, I still don't think the security mechanisms of Unicode
apply - if you have combining characters in the string, and
the precombined version also exists in Unicode, then those
algorithms may still not help. Likewise for compatibility
characters.

Regards,
Martin


More information about the Python-3000 mailing list