Stefan Krah added the comment: Disallowing non-contiguous arrays leads to very strange situations though. I'm positive that there will be a bug report about this:
>>> x = memoryview(b'abc')[::-1] >>> b = b'cba' >>> d = {b'cba': 101} >>> >>> b in d True >>> x == b True >>> x in d Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: memoryiew: hashing is restricted to C-contiguous arrays Could we perhaps take a small poll? My own vote is: 1) Allow bytes hashing at all: +0.5 2) If 1) is allowed, then also non-contiguous hashing is allowed: +1 3) Allow multi-dimensional hashing: +-0 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15814> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com