Martin Panter added the comment:

The trouble with my original idea is that it is complex to implement, and 
inconsistent. If you wrote small amounts to your BufferedWriter, you would get 
a memoryview of bytes that you save for later. If there was a write of a large 
bytes object, we could pass a memoryview of that bytes object (or the actual 
bytes object). But if there was a write of a large bytearray, we could end up 
locking that bytearray, preventing it from being resized, and there could be 
problems mutating the bytearray.

Because I can’t see how to eliminate all inconsistencies, I prefer to document 
against saving the memoryview for later.

----------

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

Reply via email to