diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-01 12:53:22 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-01 12:53:22 (GMT) |
commit | c86e8d9c1734e91f86cd2731ad176042bc9e8987 (patch) | |
tree | 18a0cbe033fbc437cc5de74299596294f1223299 /Doc/reference | |
parent | 0209dc1ff622116004b5e130f37bfa070749b26f (diff) | |
download | cpython-c86e8d9c1734e91f86cd2731ad176042bc9e8987.zip cpython-c86e8d9c1734e91f86cd2731ad176042bc9e8987.tar.gz cpython-c86e8d9c1734e91f86cd2731ad176042bc9e8987.tar.bz2 |
Improve wording for __hash__
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/datamodel.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 8dca8aa..b2ce4ff 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1291,7 +1291,7 @@ Basic customization .. note:: - Note by default the :meth:`__hash__` values of str, bytes and datetime + By default, the :meth:`__hash__` values of str, bytes and datetime objects are "salted" with an unpredictable random value. Although they remain constant within an individual Python process, they are not predictable between repeated invocations of Python. @@ -1301,9 +1301,9 @@ Basic customization dict insertion, O(n^2) complexity. See http://www.ocert.org/advisories/ocert-2011-003.html for details. - Changing hash values affects the order in which keys are retrieved from a - dict. Note Python has never made guarantees about this ordering (and it - typically varies between 32-bit and 64-bit builds). + Changing hash values affects the iteration order of dicts, sets and + other mappings. Python has never made guarantees about this ordering + (and it typically varies between 32-bit and 64-bit builds). See also :envvar:`PYTHONHASHSEED`. |