From dfbc4fcddf421e6faeadff664995d70a7cc8f526 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sat, 22 Nov 2025 13:44:19 +0000 Subject: [PATCH 1/2] Commit --- development-tools/clinic/howto.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/development-tools/clinic/howto.rst b/development-tools/clinic/howto.rst index 364cf20be..48b457e70 100644 --- a/development-tools/clinic/howto.rst +++ b/development-tools/clinic/howto.rst @@ -742,7 +742,7 @@ See also :pep:`573`. How to write a custom converter ------------------------------- -A converter is a Python class that inherits from :py:class:`CConverter`. +A converter is a Python class that inherits from :py:class:`!CConverter`. The main purpose of a custom converter, is for parameters parsed with the ``O&`` format unit --- parsing such a parameter means calling a :c:func:`PyArg_ParseTuple` "converter function". @@ -758,7 +758,7 @@ write a :py:meth:`!converter_init` method. After *self*, all additional parameters **must** be keyword-only. Any arguments passed to the converter in Argument Clinic will be passed along to your :py:meth:`!converter_init` method. -See :py:class:`CConverter` for a list of members you may wish to specify in +See :py:class:`!CConverter` for a list of members you may wish to specify in your subclass. Here's the simplest example of a custom converter, from :cpy-file:`Modules/zlibmodule.c`:: From 189a1bab6e577fd98b81376f2effd8a74182d41d Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Mon, 24 Nov 2025 20:01:29 +0000 Subject: [PATCH 2/2] Fix references to `CConverter` in Clinic HOWTO --- development-tools/clinic/howto.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/development-tools/clinic/howto.rst b/development-tools/clinic/howto.rst index 48b457e70..359c53e90 100644 --- a/development-tools/clinic/howto.rst +++ b/development-tools/clinic/howto.rst @@ -742,7 +742,7 @@ See also :pep:`573`. How to write a custom converter ------------------------------- -A converter is a Python class that inherits from :py:class:`!CConverter`. +A converter is a Python class that inherits from :py:class:`~clinic.CConverter`. The main purpose of a custom converter, is for parameters parsed with the ``O&`` format unit --- parsing such a parameter means calling a :c:func:`PyArg_ParseTuple` "converter function". @@ -758,8 +758,8 @@ write a :py:meth:`!converter_init` method. After *self*, all additional parameters **must** be keyword-only. Any arguments passed to the converter in Argument Clinic will be passed along to your :py:meth:`!converter_init` method. -See :py:class:`!CConverter` for a list of members you may wish to specify in -your subclass. +See :py:class:`~clinic.CConverter` for a list of members you may wish to specify +in your subclass. Here's the simplest example of a custom converter, from :cpy-file:`Modules/zlibmodule.c`::