Message181541
array.array doesn't implement the buffer interface in 2.7, so memoryviews cannot be applied to them. As memoryview has been backported to 2.7, array.array should be updated to support it. Either that, or the 2.7 documentation should be updated to reflect the lack of support for arrays in 2.7 (http://docs.python.org/2.7/c-api/buffer.html).
python3
>>> memoryview(array('I', [1,2,3,4]))
<memory at 0x109e46048>
python
>>> memoryview(array('I', [1,2,3,4]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: cannot make memory view because object does not have the buffer interface |
|
Date |
User |
Action |
Args |
2013-02-06 17:12:34 | demian.brecht | set | recipients:
+ demian.brecht |
2013-02-06 17:12:34 | demian.brecht | set | messageid: <1360170754.31.0.614797074916.issue17145@psf.upfronthosting.co.za> |
2013-02-06 17:12:34 | demian.brecht | link | issue17145 messages |
2013-02-06 17:12:34 | demian.brecht | create | |
|