From 1f9f2fc043dd68439d6e0a96e157c986c596199e Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Sun, 29 Oct 2023 06:43:54 +0300 Subject: [PATCH] Mention public macros in docs --- Doc/library/stdtypes.rst | 3 ++- Doc/library/sys.rst | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 8160740c7a05bd1..43ddf6d3e2ffb36 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -723,7 +723,8 @@ made available to Python as the :attr:`modulus` attribute of .. impl-detail:: Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C - longs and ``P = 2**61 - 1`` on machines with 64-bit C longs. + longs and ``P = 2**61 - 1`` on machines with 64-bit C longs. The exponent + of this Mersenne prime is available as :c:macro:`_PyHASH_BITS` macro. Here are the rules in detail: diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 5ef6f83030958fb..e15ac650acdaa03 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1022,11 +1022,13 @@ always available. .. attribute:: hash_info.modulus - The prime modulus P used for numeric hash scheme + The prime modulus P used for numeric hash scheme. Available also as + :c:macro:`_PyHASH_MODULUS` macro. .. attribute:: hash_info.inf - The hash value returned for a positive infinity + The hash value returned for a positive infinity. Available also as + :c:macro:`_PyHASH_INF` macro. .. attribute:: hash_info.nan @@ -1034,7 +1036,8 @@ always available. .. attribute:: hash_info.imag - The multiplier used for the imaginary part of a complex number + The multiplier used for the imaginary part of a complex number. + Available also as :c:macro:`_PyHASH_IMAG` macro. .. attribute:: hash_info.algorithm