Craig McQueen <pyt...@craig.mcqueen.id.au> added the comment:

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'

----------
nosy: +cmcqueen1975

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7696>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to