Message150595
> 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. |
|
Date |
User |
Action |
Args |
2012-01-04 08:17:42 | loewis | set | recipients:
+ loewis, rhettinger, terry.reedy, jcea, pitrou, alex, docs@python |
2012-01-04 08:17:41 | loewis | link | issue13707 messages |
2012-01-04 08:17:41 | loewis | create | |
|