A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-November/114477.html below:

[Python-Dev] Hashable memoryviews

[Python-Dev] Hashable memoryviews [Python-Dev] Hashable memoryviews"Martin v. Löwis" martin at v.loewis.de
Sun Nov 13 21:34:06 CET 2011
> You can't expect the memoryview() to magically know what the underlying
> hash function is. 

Hashable objects implementing the buffer interface could be required to
make their hash implementation consistent with bytes hashing. IMO, that
wouldn't be asking too much.

There is already the issue that equality may not be transitive wrt. to
buffer objects (e.g. a == memoryview(a) == memoryview(b) == b, but a !=
b). As that would be a bug in either a or b, failure to hash
consistently would be a bug as well.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4