On Sun, Jan 22, 2012 at 11:11, Victor Stinner <victor.stin...@haypocalc.com> wrote: >> This seed is chosen randomly at runtime, but cannot >> change once chosen. > > The hash is used to compare objects: if hash(obj1) != hash(obj2), > objects are considered different. So two strings must have the same > hash if their value is the same. > >> Salt could also be an appropriate term here, but since salt is >> generally changed on a per-use basis (a single process may use many >> different salts), seed is more correct, since this value is only >> chosen once per process. > > We may use a different salt per dictionary.
Can we do that? I was thinking of ways to not raise errors when we get over a collision count, but instead somehow change the way the dictionary behaves when we get over the collision count, but I couldn't come up with something. Somehow adding a salt would be one possibility. But I don't see how it's doable except for the string-keys only case mentioned before. But I might just be lacking imagination. :-) //Lennart _______________________________________________ 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