[issue15903] Make rawiobase_read() read directly to bytes object

Antoine Pitrou report at bugs.python.org
Tue Sep 18 00:30:22 CEST 2012


Antoine Pitrou added the comment:

> If either refcount is larger than the expected value of 1, then the
> data is copied rather than resized.

I think that's a useless precaution. The bytes object cannot "leak" since you are using PyMemoryView_FromMemory(), which doesn't know about the original object.

Out of curiousity, have you done any benchmarks?

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15903>
_______________________________________


More information about the Python-bugs-list mailing list