Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c86e8d9

Browse files
committed
Improve wording for __hash__
1 parent 0209dc1 commit c86e8d9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/reference/datamodel.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ Basic customization
12911291

12921292
.. note::
12931293

1294-
Note by default the :meth:`__hash__` values of str, bytes and datetime
1294+
By default, the :meth:`__hash__` values of str, bytes and datetime
12951295
objects are "salted" with an unpredictable random value. Although they
12961296
remain constant within an individual Python process, they are not
12971297
predictable between repeated invocations of Python.
@@ -1301,9 +1301,9 @@ Basic customization
13011301
dict insertion, O(n^2) complexity. See
13021302
http://www.ocert.org/advisories/ocert-2011-003.html for details.
13031303

1304-
Changing hash values affects the order in which keys are retrieved from a
1305-
dict. Note Python has never made guarantees about this ordering (and it
1306-
typically varies between 32-bit and 64-bit builds).
1304+
Changing hash values affects the iteration order of dicts, sets and
1305+
other mappings. Python has never made guarantees about this ordering
1306+
(and it typically varies between 32-bit and 64-bit builds).
13071307

13081308
See also :envvar:`PYTHONHASHSEED`.
13091309

0 commit comments

Comments
 (0)