Serhiy Storchaka added the comment:

getvalue() doesn't work after close() for purpose. close() frees memory used by 
BytesIO.

>>> import io, sys
>>> bio = io.BytesIO()
>>> sys.getsizeof(bio)
52
>>> bio.write(b'x'*1000)
1000
>>> sys.getsizeof(bio)
1053
>>> bio.close()
>>> sys.getsizeof(bio)
52

Changing the behavior will cause regression.

The behavior of memoryview looks as a bug.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23099>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to