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 cmcqueen1975
Recipients cmcqueen1975, flox, georg.brandl, pitrou, teoliphant, vstinner
Date 2010-07-12.01:04:55
SpamBayes Score 2.3461578e-05
Marked as misclassified No
Message-id <1278896697.1.0.128306929239.issue7696@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation implies that memoryview always accesses bytes:
* "len(view) returns the total number of bytes in the memoryview, view."
* "Taking a single index will return a single byte."

But, the following example shows this is misleading:

    >>> from array import array
    >>> ar = array('H', [1,2,3])
    >>> arv = memoryview(ar)
    >>> len(arv)
    3
    >>> arv[1]
    b'\x02\x00'
History
Date User Action Args
2010-07-12 01:04:57cmcqueen1975setrecipients: + cmcqueen1975, georg.brandl, teoliphant, pitrou, vstinner, flox
2010-07-12 01:04:57cmcqueen1975setmessageid: <1278896697.1.0.128306929239.issue7696@psf.upfronthosting.co.za>
2010-07-12 01:04:55cmcqueen1975linkissue7696 messages
2010-07-12 01:04:55cmcqueen1975create