Need debugging knowhow for my creeping Unicodephobia

Nobody nobody at nowhere.com
Thu Feb 11 20:27:28 EST 2010


On Wed, 10 Feb 2010 12:17:51 -0800, Anthony Tolle wrote:

> 4. Consider switching to Python 3.x, since there is only one string
> type (unicode).

However: one drawback of Python 3.x is that the repr() of a Unicode string
is no longer restricted to ASCII. There is an ascii() function which
behaves like the 2.x repr(). However: the interpreter uses repr() for
displaying the value of an expression typed at the interactive prompt,
which results in "can't encode" errors if the string cannot be converted
to your locale's encoding.




More information about the Python-list mailing list