Alexey Izbyshev <[email protected]> added the comment:
Yes, clarifying buffering for text mode in open() would be nice.
@direprobs: just in case you didn't know, you can achieve what you want with
something like the following in pre-3.7:
with open("/dev/null", "wb", buffering=10) as outb, \
io.TextIOWrapper(outb, write_through=True) as out:
out.write("x" * 20)
Sadly, write_through can't be passed to open(), but it can be changed on
existing TextIOWrapper since 3.7 (via new reconfigure() method).
----------
nosy: +izbyshev
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue30718>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com