Message263304
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. |
|
Date |
User |
Action |
Args |
2016-04-13 04:24:46 | martin.panter | set | recipients:
+ martin.panter, pitrou, benjamin.peterson, stutzbach, serhiy.storchaka |
2016-04-13 04:24:46 | martin.panter | set | messageid: <1460521486.18.0.156961089348.issue26720@psf.upfronthosting.co.za> |
2016-04-13 04:24:46 | martin.panter | link | issue26720 messages |
2016-04-13 04:24:46 | martin.panter | create | |
|