R. David Murray added the comment: Yeah, I think I was thinking of issue 19846, which was fixed by using surrogateescape on the standard streams instead of "guessing" utf-8.
I'm not utterly opposed to turning the ValueError into a default return value, but as you can see, the fact that the ValueError was returned pointed toward the deeper problem (needing to have a way to change the encoding of an already-existing TextIO stream). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24966> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com