Skip to content

Commit 21b9239

Browse files
committed
gh-100150: document that --without-doc-strings affects inspect.signature
Add a note to the --without-doc-strings documentation explaining that disabling docstrings also prevents inspect.signature() from retrieving signatures for built-in functions and methods implemented in C, since those signatures are embedded in their docstrings by Argument Clinic.
1 parent 072cd7c commit 21b9239

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Doc/using/configure.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,17 @@ also be used to improve performance.
813813

814814
See the ``PyDoc_STRVAR()`` macro.
815815

816+
.. note::
817+
818+
Disabling doc strings also means that :func:`inspect.signature` cannot
819+
retrieve signatures for built-in functions and methods implemented in C,
820+
since the signatures for these functions are embedded in their docstrings
821+
(generated by `Argument Clinic
822+
<https://devguide.python.org/development-tools/clinic/>`_). This may
823+
affect tools and libraries that rely on introspecting built-in callables,
824+
such as :func:`help` and some third-party frameworks.
825+
826+
816827
.. option:: --enable-profiling
817828

818829
Enable C-level code profiling with ``gprof`` (disabled by default).

0 commit comments

Comments
 (0)