Message170513
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 |
|
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 | |
|