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 nikratio
Recipients nikratio, pitrou, serhiy.storchaka, vstinner
Date 2014-03-26.15:17:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 03/26/2014 03:43 AM, STINNER Victor wrote:
>> class MyByteStream(BytesIO):
>>    def read1(self, len_):
>>        return memoryview(super().read(len_))
>> bs = MyByteStream(b'some data in ascii\n')
> I guess that you are trying to implement a zero-copy I/O. The problem is that BytesIO does copy data. 

Right on the first count, but wrong on the second. The class I'm
concerned with wants to do zero-copy I/O, but is not related to BytesIO.
I only picked that to produce a minimal example.
Date User Action Args
2014-03-26 15:17:27nikratiosetrecipients: + nikratio, pitrou, vstinner, serhiy.storchaka
2014-03-26 15:17:27nikratiolinkissue21057 messages
2014-03-26 15:17:27nikratiocreate