[issue15814] memoryview: equality-hash invariant
Alexander Belopolsky
report at bugs.python.org
Sun Sep 2 16:21:49 CEST 2012
Alexander Belopolsky added the comment:
On Sep 2, 2012, at 8:44 AM, Stefan Krah <report at bugs.python.org> wrote:
> The totals are +11.5 :) for hashing, +1 for allowing non-contiguous and
> -2 for multi-dimensional
I have refrained from voting because in my line of work buffers or memoryviews deal with large objects that rarely serve as dictionary keys. As a result, I have zero experince with hashing of buffers. This observation supports the current consensus to limit hashing to 1d and 0d cases. My only concern is that with hash(m) == hash(m.tobytes()) implementing multidimensional restriction will require artificial if ndim > 1 check and an extra sentence in the docs while not simplifying anything.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15814>
_______________________________________
More information about the Python-bugs-list
mailing list