Skip to content

Commit 595bd7a

Browse files
committed
improve hash docs
1 parent 8cec3d3 commit 595bd7a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Doc/c-api/hash.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`.
5656
it is easier to create colliding strings. A cutoff of 7 on 64-bit platforms
5757
and 5 on 32-bit platforms should provide a decent safety margin.
5858

59+
This corresponds to the :data:`sys.hash_info.cutoff` constant.
60+
5961
.. versionadded:: 3.4
6062

6163

@@ -71,7 +73,6 @@ See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`.
7173
.. c:macro:: PyHASH_BITS
7274
7375
The exponent ``n`` of ``P`` in :c:macro:`PyHASH_MODULUS`.
74-
This corresponds to the :data:`sys.hash_info.hash_bits` constant.
7576

7677
.. versionadded:: 3.13
7778

@@ -111,14 +112,20 @@ See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`.
111112
112113
Hash function name (UTF-8 encoded string).
113114

115+
This corresponds to the :data:`sys.hash_info.algorithm` constant.
116+
114117
.. c:member:: const int hash_bits
115118
116119
Internal size of the hash value in bits.
117120

121+
This corresponds to the :data:`sys.hash_info.hash_bits` constant.
122+
118123
.. c:member:: const int seed_bits
119124
120125
Size of seed input in bits.
121126

127+
This corresponds to the :data:`sys.hash_info.seed_bits` constant.
128+
122129
.. versionadded:: 3.4
123130

124131

0 commit comments

Comments
 (0)