New submission from Ramchandra Apte <maniandra...@gmail.com>:

If you run hash on strings containing only null characters it returns the 
length of the string
>>> hash("\0")
1
>>> hash("\0\0")
2
>>> hash("\0"*1000)
1000
This behaviour is not like proper hash functions.
The hashes of these strings should exhibit the avalanche effect like in a 
proper hash function.

----------
components: Interpreter Core
messages: 150587
nosy: ramchandra.apte
priority: normal
severity: normal
status: open
title: hash() on string containing only null characters returns the length of 
the string
type: behavior
versions: Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13710>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to