[New-bugs-announce] [issue19078] Allow reversed(memoryview), like memoryview[::-1]
Claudiu.Popa
report at bugs.python.org
Mon Sep 23 18:27:16 CEST 2013
New submission from Claudiu.Popa:
Hello. The following seems a little weird:
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32
>>> m = memoryview(b'123')
>>> list(m[::-1])
[51, 50, 49]
>>> list(reversed(m))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object of type 'memoryview' has no len()
>>>
The attached patch allows `reversed` to be called with memoryviews and it could potentially fix issue18690.
----------
components: Interpreter Core
files: memoryview.patch
keywords: patch
messages: 198324
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Allow reversed(memoryview), like memoryview[::-1]
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file31850/memoryview.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19078>
_______________________________________
More information about the New-bugs-announce
mailing list