michael urman phwgmigmailcom tue apr 15 2008 706 pm atsuo ishimoto wrote debugging think patch httpbugspythonorgissue2630 practical enough error handler sysstdout backslashescape russian want print list cyrillic string print reprlistofrussian want see detailed information specific string print reprrussianstrencodeascii backslashreplace latter gives result python2s reprrussianstr russian working ascii console printreprlistofrussian give result python2 agree enoguh see two main uses repr comes strings put quotes around contents replace control characters safe representations interpreter understands third use represent strings unambiguously major point clearly serviced tell via repr string1 string2 equal first quotes disambiguates values lists containing strings commas second backslash replaced control characters avoids using characters special meanings latter also historically disambiguates everything beyond ascii practice useful mystring similarly useful 日本語 u1234u5678u9abc cases become visually ambiguous still pass ideal case evalreprs finally atsuo ishimotos encodeascii backslashreplace much explicit expectations handles identifying whether combined character base combining diacritic etc string_escape codec repr changed assuming internally linked directly repr see benefits matching repr benefits like asciibackslashreplace dont strong preference like repr apologies hitting reply unicodedata suggestion yesterday michael michael urman _______________________________________________ python3000 mailing list python3000pythonorg httpmailpythonorgmailmanlistinfopython3000 unsubscribe httpmailpythonorgmailmanoptionspython3000python300040tangomucom thu 07 aug 2008 112724 0500 python3000 recursive str