STINNER Victor added the comment: > While we are here, it is possible to add the support of general byte-like > objects.
With and without the patch, write() accepts bytes, bytearray and memoryview. Which other byte-like types do you know? writeframesraw() method of aifc, sunau and wave modules use this pattern: if not isinstance(data, (bytes, bytearray)): data = memoryview(data).cast('B') We can maybe reuse it in gzip module? ---------- _______________________________________ 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