Message374911
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
>>> |
|
Date |
User |
Action |
Args |
2020-08-06 00:21:37 | Jeffrey.Kintscher | set | recipients:
+ Jeffrey.Kintscher, doerwalter |
2020-08-06 00:21:37 | Jeffrey.Kintscher | set | messageid: <1596673297.56.0.245641682153.issue41465@roundup.psfhosted.org> |
2020-08-06 00:21:37 | Jeffrey.Kintscher | link | issue41465 messages |
2020-08-06 00:21:37 | Jeffrey.Kintscher | create | |
|