Message170513
| Author |
pitrou |
| Recipients |
exarkun, pitrou, skrah |
| Date |
2012年09月15日.12:37:25 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1347712645.61.0.638230140824.issue15945@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Just prepend the empty bytestring if you want to make sure the result is a bytes object:
>>> b'' + memoryview(b'foo') + b'bar'
b'foobar'
I think the following limitation may be more annoying, though:
>>> b''.join([memoryview(b'foo'), b'bar'])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: sequence item 0: expected bytes, memoryview found |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月15日 12:37:25 | pitrou | set | recipients:
+ pitrou, exarkun, skrah |
| 2012年09月15日 12:37:25 | pitrou | set | messageid: <1347712645.61.0.638230140824.issue15945@psf.upfronthosting.co.za> |
| 2012年09月15日 12:37:25 | pitrou | link | issue15945 messages |
| 2012年09月15日 12:37:25 | pitrou | create |
|