Georg Brandl added the comment:
Looks good.
sys.stdout, when rebound to a binary mode file
Not sure that is supported in any way :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22492
Roundup Robot added the comment:
New changeset 9b519f72860a by Terry Jan Reedy in branch '3.4':
Issue 22492: Be explicit that print does not support binary mode files.
https://hg.python.org/cpython/rev/9b519f72860a
--
nosy: +python-dev
___
Python
Changes by Terry J. Reedy tjre...@udel.edu:
--
assignee: - terry.reedy
resolution: - fixed
stage: commit review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22492
Terry J. Reedy added the comment:
Agreed. Here is a patch I will commit if you approve. I deleted 'convenience
function' as distracting, labelled *file* a *text* stream in the first line,
and added the rest of the comment after the current 'file' sentence, making
separate 'file' and 'flush'
New submission from Georg Brandl:
This is implicit in the converts arguments to strings, but people might
reasonably expect that print(x, file=y) is the same as y.write(x) for strings
and bytes. This paragraph makes it clear.
--
files: print_binary.diff
keywords: patch
messages: