Antoine Pitrou added the comment: Be careful what happens when the original object is mutable:
>>> b = bytearray(b"abc") >>> bio = io.BytesIO(b) >>> b[:] = b"defghi" >>> bio.getvalue() b'abc' I don't know what your patch does in this case. ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22003> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com