Jeffrey Kintscher <[email protected]> added the comment:
I looked at the implementation in Lib/_pyio.py. The only way to change the error handler is by calling TextIOWrapper.reconfigure() and supply the new error handler as the "errors" parameter. For example: >>> import io >>> s = io.TextIOWrapper(io.BytesIO()) >>> print(s.errors) strict >>> s.reconfigure(errors='replace') >>> print(s.errors) replace >>> ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue41465> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
