This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author demian.brecht
Recipients demian.brecht
Date 2013-02-06.17:12:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360170754.31.0.614797074916.issue17145@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-02-06 17:12:34demian.brechtsetrecipients: + demian.brecht
2013-02-06 17:12:34demian.brechtsetmessageid: <1360170754.31.0.614797074916.issue17145@psf.upfronthosting.co.za>
2013-02-06 17:12:34demian.brechtlinkissue17145 messages
2013-02-06 17:12:34demian.brechtcreate