Message 315695 - Python tracker

Message315695

Author pekka.klarck
Recipients benjamin.peterson, ezio.melotti, lemburg, pekka.klarck, serhiy.storchaka, vstinner
Date 2018-04-24.11:33:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524569596.77.0.682650639539.issue33317@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-04-24 11:33:16pekka.klarcksetrecipients: + pekka.klarck, lemburg, vstinner, benjamin.peterson, ezio.melotti, serhiy.storchaka
2018-04-24 11:33:16pekka.klarcksetmessageid: <1524569596.77.0.682650639539.issue33317@psf.upfronthosting.co.za>
2018-04-24 11:33:16pekka.klarcklinkissue33317 messages
2018-04-24 11:33:16pekka.klarckcreate