diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-08-09 07:57:39 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-08-09 07:57:39 (GMT) |
commit | ab2f8f7bd556c16a2b30aa8ec05d4c9d8c50d311 (patch) | |
tree | 173d0b8612bd7a76a7fc9c8105e8a53370dbd7ab /Doc/ref | |
parent | 209307eb3bca9aeb9b842014edcfe8df9cbb7f91 (diff) | |
download | cpython-ab2f8f7bd556c16a2b30aa8ec05d4c9d8c50d311.zip cpython-ab2f8f7bd556c16a2b30aa8ec05d4c9d8c50d311.tar.gz cpython-ab2f8f7bd556c16a2b30aa8ec05d4c9d8c50d311.tar.bz2 |
__hash__ may now return long int; the final hash
value is obtained by invoking hash on the long int.
Fixes #1536021.
Diffstat (limited to 'Doc/ref')
-rw-r--r-- | Doc/ref/ref3.tex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex index 8ec9e2b..15fc188 100644 --- a/Doc/ref/ref3.tex +++ b/Doc/ref/ref3.tex @@ -1307,6 +1307,11 @@ defines mutable objects and implements a \method{__cmp__()} or since the dictionary implementation requires that a key's hash value is immutable (if the object's hash value changes, it will be in the wrong hash bucket). + +\versionchanged[\method{__hash__()} may now also return a long +integer object; the 32-bit integer is then derived from the hash +of that object]{2.5} + \withsubitem{(object method)}{\ttindex{__cmp__()}} \end{methoddesc} |