[docs] [issue20699] Document that binary IO classes work with bytes-likes objects
report at bugs.python.org
Fri Jun 3 03:46:51 EDT 2016
Martin Panter added the comment:
Actually this bug report was opened because an implementation that lacked memoryview support was broken by 2.7. The point is to document that (a subset of) memoryview objects may be passed to custom implementations.
Does this need a “changed in 2.7” notice? I am not so familiar with the history of Python 2 or the various buffer APIs to be sure.
Also see <https://bugs.python.org/issue20699#msg266523>, where I discovered array('b') does not work with io.BytesIO.write(). It seems you have to wrap it in buffer() first, presumably because array() does not support the “new” protocol, but buffer() does.
Python tracker <report at bugs.python.org>
More information about the docs