Skip to content

Commit 2c6002f

Browse files
committed
Mention public macros in docs
1 parent 0ce377a commit 2c6002f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Doc/library/stdtypes.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,8 @@ made available to Python as the :attr:`modulus` attribute of
723723
.. impl-detail::
724724

725725
Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C
726-
longs and ``P = 2**61 - 1`` on machines with 64-bit C longs.
726+
longs and ``P = 2**61 - 1`` on machines with 64-bit C longs. The exponent
727+
of this Mersenne prime is available as ``_PyHASH_BITS`` macro.
727728

728729
Here are the rules in detail:
729730

Doc/library/sys.rst

+6-3
Original file line numberDiff line numberDiff line change
@@ -1022,19 +1022,22 @@ always available.
10221022

10231023
.. attribute:: hash_info.modulus
10241024

1025-
The prime modulus P used for numeric hash scheme
1025+
The prime modulus P used for numeric hash scheme. Available also as
1026+
``_PyHASH_MODULUS`` macro.
10261027

10271028
.. attribute:: hash_info.inf
10281029

1029-
The hash value returned for a positive infinity
1030+
The hash value returned for a positive infinity. Available also as
1031+
``_PyHASH_INF`` macro.
10301032

10311033
.. attribute:: hash_info.nan
10321034

10331035
(This attribute is no longer used)
10341036

10351037
.. attribute:: hash_info.imag
10361038

1037-
The multiplier used for the imaginary part of a complex number
1039+
The multiplier used for the imaginary part of a complex number.
1040+
Available also as ``_PyHASH_IMAG`` macro.
10381041

10391042
.. attribute:: hash_info.algorithm
10401043

0 commit comments

Comments
 (0)