[issue19078] Allow reversed(memoryview), like memoryview

Stefan Krah report at bugs.python.org
Sat Sep 28 16:28:27 CEST 2013


Stefan Krah added the comment:

Yes, len() should return the number of items. +1 for making reversed()
work.

NumPy does this:

>>> x = numpy.array([1,2,3,4,5,6,7,8])
>>> list(reversed(x))
[8, 7, 6, 5, 4, 3, 2, 1]
>>>
>>> x = numpy.array([[1,2,3], [4,5,6]])
>>> list(reversed(x))
[array([4, 5, 6]), array([1, 2, 3])]
>>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19078>
_______________________________________


More information about the Python-bugs-list mailing list