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 loewis
Recipients alex, docs@python, jcea, loewis, pitrou, rhettinger, terry.reedy
Date 2012-01-04.08:17:41
SpamBayes Score 1.3009219e-06
Marked as misclassified No
Message-id <4F040B24.7030403@v.loewis.de>
In-reply-to <1325644730.01.0.0342595612945.issue13707@psf.upfronthosting.co.za>
Content
> Martin, I do not understand. The default hash is based on id (as is
> default equality comparison), not value.

In the default implementation, the id *is* the object's value (i.e.
objects, by default, only compare equal if they are identical). So
the default implementation is just a special case of the more general
rule that hashes need to be consistent with equality.

> Are you OK with hash values changing if the 'value' changes?

An object that can change its value (i.e. a mutable object) should
fail to hash.
History
Date User Action Args
2012-01-04 08:17:42loewissetrecipients: + loewis, rhettinger, terry.reedy, jcea, pitrou, alex, docs@python
2012-01-04 08:17:41loewislinkissue13707 messages
2012-01-04 08:17:41loewiscreate