Message238329
| Author |
serhiy.storchaka |
| Recipients |
serhiy.storchaka, vstinner, wolma |
| Date |
2015年03月17日.18:41:39 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1426617699.21.0.00532244107233.issue23688@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|