[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)
Amaury Forgeot d'Arc
report at bugs.python.org
Tue Mar 12 19:58:36 CET 2013
Amaury Forgeot d'Arc added the comment:
The proposed workaround seems to work ("wb" instead of "wt"!), with the following restrictions:
- it's not really unbuffered: the encoder has its own buffers (OK, in the stdlib only 'idna' encoding will retain data)
- it won't work for reading: TextIOWrapper calls the read1() method, which is only defined by BufferedIO objects.
IMO this explains why it's not a supported combination in io.open().
----------
nosy: +amaury.forgeotdarc
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17404>
_______________________________________
More information about the Python-bugs-list
mailing list