Message238329
You patch is correct Wolfgang, but with cast('B') the patch would be smaller (no need to replace len(data) to nbytes).
While we are here, it is possible to add the support of general byte-like objects.
if not isinstance(data, bytes):
data = memoryview(data).cast('B')
isinstance() check is just for optimization, it can be omitted if doesn't affect a performance. |
|
Date |
User |
Action |
Args |
2015-03-17 18:41:39 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, wolma |
2015-03-17 18:41:39 | serhiy.storchaka | set | messageid: <1426617699.21.0.00532244107233.issue23688@psf.upfronthosting.co.za> |
2015-03-17 18:41:39 | serhiy.storchaka | link | issue23688 messages |
2015-03-17 18:41:39 | serhiy.storchaka | create | |
|