This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author exarkun
Recipients exarkun, pitrou, skrah
Date 2012-09-16.23:23:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347837781.51.0.608279562368.issue15945@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2012-09-16 23:23:01exarkunsetrecipients: + exarkun, pitrou, skrah
2012-09-16 23:23:01exarkunsetmessageid: <1347837781.51.0.608279562368.issue15945@psf.upfronthosting.co.za>
2012-09-16 23:23:01exarkunlinkissue15945 messages
2012-09-16 23:23:00exarkuncreate