> Each string would get two hashes: the "public" hash, which is constant > across runs and bugfix releases, and the dict-hash, which is only used > by the dictionary implementation, and only if all keys to the dict are > strings.
The distinction between secret (private, secure) and "public" hash (deterministic) is not clear to me. Example: collections.UserDict implements __hash__() using hash(self.data). Should it use the public or the private hash? collections.abc.Set computes its hash using hash(x) of each item. Same question. If we need to use the secret hash, it should be exposed in Python. Which function/method would be used? I suppose that we cannot add anything to stable releases like 2.7. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com