From 6300ea7b66da282f158ae82cab4b226173c32439 Mon Sep 17 00:00:00 2001 From: RafaelWO Date: Sat, 20 Jun 2026 13:36:53 +0200 Subject: [PATCH 1/2] De-personalize docs on using the C API This rephrases parts of the documentation on using the C API to remove first-person pronouns. --- Doc/extending/extending.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index d33cbd2813d637b..89df8a840101df6 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -231,10 +231,10 @@ calling the Python callback functions from a C callback. Other uses are also imaginable. Fortunately, the Python interpreter is easily called recursively, and there is a -standard interface to call a Python function. (I won't dwell on how to call the -Python parser with a particular string as input --- if you're interested, have a -look at the implementation of the :option:`-c` command line option in -:file:`Modules/main.c` from the Python source code.) +standard interface to call a Python function. (If you're interested in how to call the +Python parser with a particular string as input, have a look at the implementation of +the :option:`-c` command line option in :file:`Modules/main.c` from the Python source +code.) Calling a Python function is easy. First, the Python program must somehow pass you the Python function object. You should provide a function (or some other @@ -641,7 +641,7 @@ and the object is freed. An alternative strategy is called :dfn:`automatic garbage collection`. (Sometimes, reference counting is also referred to as a garbage collection -strategy, hence my use of "automatic" to distinguish the two.) The big +strategy, hence the use of "automatic" to distinguish the two.) The big advantage of automatic garbage collection is that the user doesn't need to call :c:func:`free` explicitly. (Another claimed advantage is an improvement in speed or memory usage --- this is no hard fact however.) The disadvantage is that for From 01418fbf37a7582ab05a2e55e73889e6a409f2c7 Mon Sep 17 00:00:00 2001 From: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com> Date: Sun, 21 Jun 2026 10:47:45 +0200 Subject: [PATCH 2/2] Update doc reference to calling parser with string input Instead of referring to `main.c` in the source code, reference the newer documentation "The Very High Level Layer" Co-authored-by: Stan Ulbrych --- Doc/extending/extending.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index 89df8a840101df6..110dfea8cb98abe 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -232,9 +232,7 @@ imaginable. Fortunately, the Python interpreter is easily called recursively, and there is a standard interface to call a Python function. (If you're interested in how to call the -Python parser with a particular string as input, have a look at the implementation of -the :option:`-c` command line option in :file:`Modules/main.c` from the Python source -code.) +Python parser with a particular string as input, see :ref:`veryhigh`.) Calling a Python function is easy. First, the Python program must somehow pass you the Python function object. You should provide a function (or some other