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 vstinner
Recipients serhiy.storchaka, vstinner, wolma
Date 2015-03-17.21:43:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426628628.35.0.00976295947648.issue23688@psf.upfronthosting.co.za>
In-reply-to
Content
> 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?
History
Date User Action Args
2015-03-17 21:43:48vstinnersetrecipients: + vstinner, serhiy.storchaka, wolma
2015-03-17 21:43:48vstinnersetmessageid: <1426628628.35.0.00976295947648.issue23688@psf.upfronthosting.co.za>
2015-03-17 21:43:48vstinnerlinkissue23688 messages
2015-03-17 21:43:48vstinnercreate