Author christian.heimes
Recipients Arfrever, Huzaifa.Sidhpurwala, Mark.Shannon, PaulMcMillan, Zhiping.Deng, alex, barry, benjamin.peterson, christian.heimes, dmalcolm, georg.brandl, gvanrossum, haypo, jcea, lemburg, merwok, pitrou, terry.reedy
Date 2012-01-05.10:20:26
SpamBayes Score 3.37448e-08
Marked as misclassified No
Message-id <1325758827.39.0.163970385347.issue13703@psf.upfronthosting.co.za>
In-reply-to
Content
It's quite possible that a user has created a function (by mistake or deliberately) that gives away the hash of an arbitrary string. We haven't taught developers that (s)he shouldn't disclose the hash of a string.

> Why should hash("") always return 0?
> I can't find it in the docs anywhere.

hash("") should return something constant that doesn't reveal information about the random seeds. 0 is an arbitrary choice that is as good as anything else. hash("") already returns 0, hence my suggestion for 0.
History
Date User Action Args
2012-01-05 10:20:27christian.heimessetrecipients: + christian.heimes, lemburg, gvanrossum, barry, georg.brandl, terry.reedy, jcea, pitrou, haypo, benjamin.peterson, merwok, Arfrever, alex, dmalcolm, Mark.Shannon, Zhiping.Deng, Huzaifa.Sidhpurwala, PaulMcMillan
2012-01-05 10:20:27christian.heimessetmessageid: <1325758827.39.0.163970385347.issue13703@psf.upfronthosting.co.za>
2012-01-05 10:20:26christian.heimeslinkissue13703 messages
2012-01-05 10:20:26christian.heimescreate