Josiah Carlson wrote: > Robin Becker wrote: >> Is the any way to get an efficient 16bit hash in python? > > hash(obj)&65535 > > - Josiah yes I thought of that, but cannot figure out if the internal hash really distributes the bits evenly. Particularly since it seems to treat integers etc as special cases
>>> hash(1) 1 >>> hash(2) 2 >>> hash('1234') 1723328704 >>> -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list