[Python-ideas] Adding an 'errors' argument to print
Guido van Rossum
guido at python.org
Fri Mar 24 14:15:28 EDT 2017
On Fri, Mar 24, 2017 at 9:37 AM, Victor Stinner <victor.stinner at gmail.com>
wrote:
> *If* we change something, I would prefer to modify sys.stdout. The
> following issue proposes to add
> sys.stdout.set_encoding(errors='replace'):
> http://bugs.python.org/issue15216
>
I like that.
> You can already set the PYTHONIOENCODING environment variable to
> ":replace" to use "replace" on sys.stdout (and sys.stderr).
>
Great tip, I've needed this!
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170324/b7bf7039/attachment.html>
More information about the Python-ideas
mailing list