Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python's hashes for small integers never collide.

Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)

>>> map(hash, range(10))

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: