[Python-3000] PEP 3138- String representation in Python 3000
Oleg Broytmann
phd at phd.pp.ru
Thu May 15 19:06:02 CEST 2008
On Thu, May 15, 2008 at 05:53:39PM +0100, Paul Moore wrote:
> One point I forgot to clarify is that I'm fully aware that
> print(arbitrary_string) may display garbage, if the string contains
> Unicode that my display can't handle. The key point for me is that
> print(repr(arbitrary_string)) is *guaranteed* to display correctly,
> even on my limited-capability terminal, precisely because it only uses
> ASCII and no matter how dumb, all terminals I know of display ASCII.
That's up to print() or any other output device to decide, not to
repr(). If I send repr() from a CGI back to the browser it doesn't matter
if the server is ascii-only, it only matters if the browser can display
unicode.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-3000
mailing list