[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Need debugging knowhow for my creeping Unicodephobia

John Doe

2/12/2010 1:27:00 AM

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.