[docs] Return value of hash() and id() of an user-defined class
Antonio Cota
antomsa at hotmail.it
Mon Jun 16 20:34:17 CEST 2014
https://docs.python.org/3.5/glossary.html#term-hashable
actual docs says:
" Objects which are instances of user-defined classes are hashable by
default; they all compare unequal (except with themselves), and their
hash value is theirid()
<https://docs.python.org/3.3/library/functions.html#id>."
I think it should be:
" Objects which are instances of user-defined classes are hashable by
default; they all compare unequal (except with themselves), and their
hash value is *DERIVED* from theirid()
<https://docs.python.org/3.3/library/functions.html#id>." because hash()
and id() of an instance of an user-defined class don't return the same
value.
Best regards,
Antonio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20140616/60015edd/attachment.html>
More information about the docs
mailing list