[Python-ideas] PEP 540: Add a new UTF-8 mode

Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Thu Jan 12 10:45:06 EST 2017


Stephan Houben writes:

 > I think this may be a minor concern ultimately, but it would be
 > nice if we had some API to at least reliable answer the question
 > "can I safely output non-ASCII myself?"

You can't; stdout might be a TTY, pipe, or socket in which case you
have no way to determine that.



More information about the Python-ideas mailing list