Pekka Klärck <[email protected]> added the comment:
I didn't submit this as a bug report but as an enhancement request. From
usability point of view, saying that results differ but you just cannot see the
difference is not very helpful.
The exact reason I didn't submit this as an enhancement request for unittest,
pytest, and all other modules/tools being affected is that "I'm not sure if
there's a good way to detect whether two unicode strings are going to display
confusingly similarly". Enhancing `repr()` would be a logical solution to this
problem.
Finally, would any harm be done if `repr('hyva\u0308')` would be changed to
`'hyva\\u0308'`? I don't see it being any different than `repr('foo\x00')`
being `'foo\\x00'`; in both cases you can `eval()` the result to get the
original value back like `repr()` is supposed to do when possible. Most
importantly, the result would show that the value actually contains like you
generally expect `repr()` to do.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33317>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com