Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
Here is another str method not ready for non-BMP chars: >>> u = '\U00010140' >>> u.translate({ord(u):ord('A')}) '𐅀' (expected 'A') >>> u = 'B' >>> u.translate({ord(u):ord('A')}) 'A' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10521> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com