This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients Arfrever, Huzaifa.Sidhpurwala, Mark.Shannon, PaulMcMillan, Zhiping.Deng, alex, barry, benjamin.peterson, christian.heimes, dmalcolm, eric.araujo, georg.brandl, gvanrossum, jcea, lemburg, pitrou, terry.reedy, vstinner
Date 2012-01-05.10:20:26
SpamBayes Score 3.374482e-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, vstinner, benjamin.peterson, eric.araujo, 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