From 85e5b8ed3e8ad59169a274c14ce37c71f97ad1f1 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Fri, 2 Oct 2026 16:28:11 -0400 Subject: [PATCH] Clarify that pythonapi *may* be None under a statically linked interp. --- Doc/library/ctypes.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 35658aeba70505..c492451148341d 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -1755,8 +1755,9 @@ These prefabricated library loaders are available: :c:expr:`int`, which is of course not always the truth, so you have to assign the correct :attr:`!restype` attribute to use these functions. - Note that if the Python interpreter is statically linked, this will be - ``None``, as ``dlopen`` is not possible in this case. + .. note:: + + If the Python interpreter is statically linked, this may be ``None``. .. audit-event:: ctypes.dlopen name ctypes.LibraryLoader