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 <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

Reply via email to