Message170579
> What is the expected outcome? memoryviews can't be resized, so
this scenario isn't possible:
The same as `view.tobytes() + bytes`, but without the extra copy implied by `view.tobytes()`.
> Just prepend the empty bytestring if you want to make sure the result is a bytes object:
Or I could explicitly convert the memoryview to a bytes object. That strikes me as rather preferable. However, this defeats one use of memoryview, which is to avoid unnecessary copying. So it might be suitable workaround for some cases, but not all. |
|
Date |
User |
Action |
Args |
2012-09-16 23:23:01 | exarkun | set | recipients:
+ exarkun, pitrou, skrah |
2012-09-16 23:23:01 | exarkun | set | messageid: <1347837781.51.0.608279562368.issue15945@psf.upfronthosting.co.za> |
2012-09-16 23:23:01 | exarkun | link | issue15945 messages |
2012-09-16 23:23:00 | exarkun | create | |
|