[issue15814] memoryview: equality-hash invariant

Stefan Behnel report at bugs.python.org
Fri Aug 31 06:14:02 CEST 2012


Stefan Behnel added the comment:

To add on Dag's comments, this essentially means that any caching of the hash value is dangerous, unless it can be assured that the underlying buffer definitely has not changed in the meantime. There is no way for users to explicitly tell a memoryview to rehash itself, so putting it into one dict, then modifying the content, then putting it into another is a perfectly reasonable use case for users, but fails when the memory view caches its hash value.

As far as I can see it, any "obvious" fix for this creates a whole bath tub full of worms: updating views transitively, adding new APIs, supporting new buffer parameters, ...

----------

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


More information about the Python-bugs-list mailing list