Pekka Klärck <pekka.kla...@gmail.com> added the comment: Forgot to mention that this doesn't affect Python 2:
>>> a = u'hyv\xe4' >>> b = u'hyva\u0308' >>> print(repr(a)) u'hyv\xe4' >>> print(repr(b)) u'hyva\u0308' In addition to hoping `repr()` would be enhanced in future Python 3 versions, I'm also looking for a way how to show differences between strings that look the same but are different. Currently the best I've found is this: >>> print('hyva\u0308'.encode('unicode_escape').decode('ASCII')) hyva\u0308 ---------- versions: +Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33317> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com