Message189900
| Author |
serhiy.storchaka |
| Recipients |
barry, ezio.melotti, kushal.das, ncoghlan, pitrou, serhiy.storchaka, vstinner |
| Date |
2013年05月24日.07:01:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1369378919.79.0.0373937710917.issue17839@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
It works only if input also supports slicing and this slicing is corresponded to bytes-slicing. It perhaps doesn't catch a non C-continuous buffers.
Actually we need something like (unlikely cast() doesn't work with empty buffers):
s = memoryview(s)
if not s:
return b''
s = s.cast('B')
... |
|