Explanation.

This commit is contained in:
Itamar Turner-Trauring 2020-08-17 12:04:52 -04:00
parent af5e9eaf67
commit f95f9c481e
1 changed files with 3 additions and 0 deletions

View File

@ -186,6 +186,9 @@ def is_printable_ascii(s):
def unicode_to_output(s): def unicode_to_output(s):
""" """
Encode an unicode object for representation on stdout or stderr. Encode an unicode object for representation on stdout or stderr.
On Python 3 just returns the string unchanged, since it is not necessary to
encode in any way.
""" """
precondition(isinstance(s, unicode), s) precondition(isinstance(s, unicode), s)
if PY3: if PY3: