Armin Rigo added the comment: @Serhiy: it's a behavior change and as such not an option for a micro release. For example, the following legal code would behave differently: it would compute s = '\\u1234' instead of s = 'UTF8:\xe1\x88\xb4'.
try: s = repr(x) except UnicodeEncodeError: s = 'UTF8:' + x.value.encode('utf-8') I think I agree that a working repr() is generally better, but in this case it should point to the programmer that they should rather have __repr__() return something sensible and avoid the trick above... ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5876> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com