Serhiy Storchaka added the comment:

> With and without the patch, write() accepts bytes, bytearray and memoryview.
> Which other byte-like types do you know?

The "bytes-like object" term is used as an alias of "an instance of type that 
supports buffer protocol". Besides bytes, bytearray and memoryview, this is 
array.array and NumPy arrays. file.write() supports arbitrary bytes-like 
objects, including array.array and NumPy arrays.

> writeframesraw() method of aifc, sunau and wave modules use this pattern:

Yes, I wrote this code, if I remember correct.

----------
title: unnecessary copying of memoryview in gzip.GzipFile.write ? -> 
unnecessary copying of memoryview in gzip.GzipFile.write?

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23688>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to