[issue18512] sys.stdout.write does not allow bytes in Python 3.x

Juan Luis Boya García report at bugs.python.org
Sat Jul 20 04:31:21 CEST 2013


New submission from Juan Luis Boya García:

Sometimes developers need to write text to stdout, and it's nice to have on the fly Unicode to UTF-8 conversion (or what matches the platform), but sometimes they also need to output binary blobs, like text encoded in other codifications than the system default, binary files, etc.

Python2 does the thing more-or-less right and allows writing both text and binary. I think Python3 should also accept both.

----------
components: Library (Lib)
messages: 193394
nosy: ntrrgc
priority: normal
severity: normal
status: open
title: sys.stdout.write does not allow bytes in Python 3.x
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18512>
_______________________________________


More information about the Python-bugs-list mailing list