Commit 2e43a9fd authored by Antoine Pitrou's avatar Antoine Pitrou

Improve wording for __hash__

parent baec6c13
...@@ -1291,7 +1291,7 @@ Basic customization ...@@ -1291,7 +1291,7 @@ Basic customization
.. note:: .. 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 objects are "salted" with an unpredictable random value. Although they
remain constant within an individual Python process, they are not remain constant within an individual Python process, they are not
predictable between repeated invocations of Python. predictable between repeated invocations of Python.
...@@ -1301,9 +1301,9 @@ Basic customization ...@@ -1301,9 +1301,9 @@ Basic customization
dict insertion, O(n^2) complexity. See dict insertion, O(n^2) complexity. See
http://www.ocert.org/advisories/ocert-2011-003.html for details. http://www.ocert.org/advisories/ocert-2011-003.html for details.
Changing hash values affects the order in which keys are retrieved from a Changing hash values affects the iteration order of dicts, sets and
dict. Note Python has never made guarantees about this ordering (and it other mappings. Python has never made guarantees about this ordering
typically varies between 32-bit and 64-bit builds). (and it typically varies between 32-bit and 64-bit builds).
See also :envvar:`PYTHONHASHSEED`. See also :envvar:`PYTHONHASHSEED`.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment