[Python-3000] Recursive str

atsuo ishimoto ishimoto at gembook.org
Wed Apr 16 02:06:27 CEST 2008


2008/4/16, Guido van Rossum <guido at python.org>:
>
> So it sounds like we're doomed if we do, and damned if we don't. Or do
>  I misunderstand you? Do you have a practical suggestion?
>

For debugging, I think patch http://bugs.python.org/issue2630 is
practical enough if error handler of sys.stdout is 'backslashescape'.

If you are Russian and you want to print list of Cyrillic string, you
can print repr(listOfRussian). If you want to see more detailed
information of specific string, you can print
repr(russianStr).encode("ascii", "backslashreplace"). Latter gives
you a same result as Python2's repr(russianStr).
If you are not Russian and working on ASCII console,
print(repr(listOfRussian)) give you a same result as Python2.


More information about the Python-3000 mailing list