[docs] [issue20699] Document that binary IO classes work with bytes-likes objects

Martin Panter report at bugs.python.org
Tue Apr 12 09:25:07 EDT 2016


Martin Panter added the comment:

After thinking about Issue 26720 (see also Issue 15994), I think it might be worth documenting not only that bytes-like objects may be passed, but in some cases the class should not be access the object after the method returns. This applies to at least RawIOBase.readinto() and especially RawIOBase.write(). If you want to save the write() data in memory, you have to make a copy, because the original may be lost when BufferedWriter overwrites its internal buffeer.

----------

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


More information about the docs mailing list